Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cakephp:需要对GET表单进行URL编码_Php_Cakephp - Fatal编程技术网

Cakephp:需要对GET表单进行URL编码

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>

我使用GET将参数传递给控制器的形式如下:

<?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编码