Cakephp:需要对GET表单进行URL编码
我使用GET将参数传递给控制器的形式如下:Cakephp:需要对GET表单进行URL编码,php,cakephp,Php,Cakephp,我使用GET将参数传递给控制器的形式如下: <?php echo $form->create('Entity', array('controller'=>'entities', 'name' => 'SearchForm','action'=>'index', 'type'=>'GET')); ?> <table class="searchTable"> <tr>
<?php echo $form->create('Entity', array('controller'=>'entities', 'name' => 'SearchForm','action'=>'index', 'type'=>'GET')); ?>
<table class="searchTable">
<tr>
<td>
<?php
$ticker = (isset($this->passedArgs['ticker'])) ? $this->passedArgs['ticker'] : "";
echo $this->Form->input('ticker', array("value"=>$ticker));
?>
</td>
</tr>
<tr>
<td>
<?php
$name = (isset($this->passedArgs['full_name'])) ? $this->passedArgs['full_name'] : "";
echo $this->Form->input('Description', array("value"=>$name));
?>
</td>
</tr>
<tr>
<td>
<?php
$country = (isset($this->passedArgs['country'])) ? $this->passedArgs['country'] : "";
$country_id = (isset($this->passedArgs['country_id'])) ? $this->passedArgs['country_id'] : "";
echo $this->Form->input('country', array("value"=>$country));
echo $this->Form->hidden('country_id', array('value'=>$country_id));
?>
</td>
</tr>
<tr>
<td><?php echo ' Filters enabled:';?></td>
</tr>
<tr>
<td>
<?php
$enable = isset($this->params['named']['enable']) ? $this->params['named']['enable'] : null;
echo $form->input('enable', array('label'=>false,'type'=>'checkbox', 'checked'=> (boolean) $enable));
?>
</td>
</tr>
<tr>
<td><?php echo $this->Form->end(__('Refresh List', true)); ?></td>
</tr>
</table>
未对参数进行URL编码。对我来说,实现这一目标的最佳方式是什么?我是否需要使用javascript,因为url是由浏览器生成的
我使用的是1.3.7版。我最终把它做成了一篇文章,我不必处理URL编码