public
Created

javascript 和 php 传字符串编码处理

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5
javascript:
var ajaxRUrl = 'http://'+domain+'/star/~ajax/relateMsg?q='+encodeURI('{$personname}');
 
PHP:
$personname = urldecode($_GET['q']);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.