Home >Backend Development >PHP Tutorial >Passing a path as a parameter will result in incomplete parsing.

Passing a path as a parameter will result in incomplete parsing.

WBOY
WBOYOriginal
2016-10-17 09:30:241491browse

Passing a path as a parameter will result in incomplete parsing

<code>$url="确定,".C("WEBURL").__ROOT__.U('App/Member/newsale');
             $this->redirect ("App/Services/index",array('statue'=>'ok',"msg"=>urlencode('卡券使用成功!'),"url"=>urlencode($url))); 
             
</code>

Receive code:

<code>$msg=urldecode($_GET['msg']); 
         $msg=empty($msg)?"参数错误":$msg;
         $statue=empty($_GET['statue'])?'ok':$_GET['statue'];
         if($_GET['url']){
             $url=urldecode($_GET['url']);
             $arr=explode(',', $url);
             
         }
         </code>

Then print $arr

Passing a path as a parameter will result in incomplete parsing.

Reply content:

Passing a path as a parameter will result in incomplete parsing

<code>$url="确定,".C("WEBURL").__ROOT__.U('App/Member/newsale');
             $this->redirect ("App/Services/index",array('statue'=>'ok',"msg"=>urlencode('卡券使用成功!'),"url"=>urlencode($url))); 
             
</code>

Receive code:

<code>$msg=urldecode($_GET['msg']); 
         $msg=empty($msg)?"参数错误":$msg;
         $statue=empty($_GET['statue'])?'ok':$_GET['statue'];
         if($_GET['url']){
             $url=urldecode($_GET['url']);
             $arr=explode(',', $url);
             
         }
         </code>

Then print $arr

Passing a path as a parameter will result in incomplete parsing.

Report to the poster that everything is normal when I return it. There is no situation like the poster.
ps: Is it really good to submit Chinese using get method? ? ?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn