dreamlife2014
2014-08-09 11:04
浏览 26
已采纳

在main.php yii中的URL设置中加密参数?

Here problem is with encrypt code in the url,

My url is this and encrypt code is at the last:

http://localhost/php_pro_106/reload/ByCustomer/mJYwIzoaIGe0R8lAVCqPhG%2Fg0jJFWjiWWdPnkq5VDlY%3D

In main.php Url settings:

'urlManager'=>array(
     'urlFormat'=>'path',
     'showScriptName' => false,
      'caseSensitive'=>false,
        'rules'=>array(
            'giftcard/<id:\w+>'=>'giftcard/index',
            'reload/ByCustomer/<giftcode:\w+>'=>'reload/ByCustomer',

             '<controller:\w+>/<id:\d+>'=>'<controller>/view',

           '<controller:\w+>/<action:\w+>/<id:\w+>'=>'<controller>/<action>',
            '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

           ),
    ),

my action is in reload controller:

public function actionByCustomer()
  {

    echo "test";
    print_r($_GET);
    }

I am getting:

The requested URL     /localhost/reload/ByCustomer/mJYwIzoaIGe0R8lAVCqPhG/g0jJFWjiWWdPnkq5VDlY= was    
not found on this server.

Actually problem is with ByCustomer/mJYwIzoaIGe0R8lAVCqPhG%2Fg0jJFWjiWWdPnkq5VDlY%3D as it is encrypt.What Should I do to make it work?

图片转代码服务由CSDN问答提供 功能建议

这里的问题是网址中的加密代码,

我的网址是 这个和加密代码是最后一个:

  http:// localhost / php_pro_106 / reload / ByCustomer / mJYwIzoaIGe0R8lAVCqPhG%2Fg0jJFWjiWWdPnkq5VDlY%3D 
    
 
 

在main.php Url设置中:

 'urlManager'=&gt; array(
'urlFormat'=&gt;'path',
  'showScriptName'=&gt; false,
'caseSensitive'=&gt; false,
'规则'=&gt;数组(
'礼品卡/&lt; id:\ w +&gt;'=&gt;'礼品卡/索引 ',
'reload / ByCustomer /&lt; giftcode:\ w +&gt;'=&gt;'reload / ByCustomer',
 
'&lt; controller:\ w +&gt; /&lt; id:\ d +  &gt;'=&gt;'&lt; controller&gt; / view',
 
'&lt; controller:\ w +&gt; /&lt; action:\ w +&gt; /&lt; id:\ w +&gt;'  =&gt;'&lt; controller&gt; /&lt; action&gt;',
'&lt; controller:\ w +&gt; /&lt; action:\ w +&gt;'=&gt;'&lt; controller&gt; /&lt; action&gt  ;',
 
),
),
   
 
 

我的操作处于重装控制 ler:

  public function actionByCustomer()
 {
 
 echo“test”; 
 print_r($ _ GET); 
} 
    
 
 

我收到了:

 在此服务器上找不到请求的URL / localhost / reload / ByCustomer / mJYwIzoaIGe0R8lAVCqPhG / g0jJFWjiWWdPnkq5VDlY =  。
   
 
 

实际上问题在于 ByCustomer / mJYwIzoaIGe0R8lAVCqPhG%2Fg0jJFWjiWWdPnkq5VDlY%3D ,因为它是加密的。我应该怎样做才能使它工作?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题