说实话 不知道为什么会有不同的编码
---
$a = urlencode(‘http://example.com/foo?a=b‘);
==== http%3A%2F%2Fexample.com%2Ffoo%3Fa%3Db 其中空格是+号
$url = url(‘node/34‘,array(‘query‘=>array(‘a‘=>‘b c‘)));
==== D:\phpStudy\WWW\drupal/node/34?a=b%20c 空格是%20
$url = url(‘node/34‘,array(‘query‘=>array(‘a‘=>‘b‘)));
==== D:\phpStudy\WWW\drupal/node/34?a=b
时间: 2024-11-05 12:28:34