如何在php中将编码字符串传递到url?
我想对url地址进行编码。在我的php文件(test.php)中,我得到脚本名并对其进行编码。当我回显$ss1时,我得到了这个如何在php中将编码字符串传递到url?,url,urlencode,url-encoding,Url,Urlencode,Url Encoding,我想对url地址进行编码。在我的php文件(test.php)中,我得到脚本名并对其进行编码。当我回显$ss1时,我得到了这个/sample/example/test.php,然后我对我得到的字符串进行编码l3nhbxbsz9legftcgxll3rlc3qucghw,现在我想在我的test.php文件中传递它 $ss1 = ($_SERVER['SCRIPT_NAME']); echo $ss1; $ss2=base64_encode($ss1); echo $ss2;
/sample/example/test.php
,然后我对我得到的字符串进行编码l3nhbxbsz9legftcgxll3rlc3qucghw
,现在我想在我的test.php文件中传递它
$ss1 = ($_SERVER['SCRIPT_NAME']);
echo $ss1;
$ss2=base64_encode($ss1);
echo $ss2;
“我想在test.php文件中传递它”是什么意思?我想在浏览test.php文件时将编码字符串传递到url地址