怎么不让php自动把×换成×号

WBOY
Release: 2016-06-23 13:59:18
Original
954 people have browsed it

需要向对方API传送一个×tamp值,结果PHP把×tamp直接转成×tamp了,真是头疼哈哈


回复讨论(解决方案)

不可能!
贴出你的示例代码

这个问题我碰到好几次了
浏览器解析html的时候会把 字符串 '×' 显示成符号 '×',你查看网页源代码会发现其实并没有转成,只是在前端显示成了 '×'

		//参数列表		$signstrarr = array();		$signstrarr['app_key'] = $this->app_key;		$signstrarr['format'] = $this->format;		$signstrarr['method'] = $this->method;		$signstrarr['card_id'] = $card_id;		$signstrarr['password'] = $password;		//$signstrarr['sign_method'] = $this->sign_method;		$signstrarr['timestamp'] = $this->timestamp;		$signstrarr['v'] = $this->v;		$signstrarr['sign_v'] = $this->sign_v;						ksort($signstrarr);//按键名进行升序排列				foreach ($signstrarr as $key=>$value)		{			$signstr .= $key.$value;			$query .= $key.'='.$value.'&';			echo "&".$key."<br />";//这里输出就是&times;tamp了		}
Copy after login

问题是我看网页源代码他也转了

sign_v=1&times;tamp=20120327105202
Copy after login

这只是你在浏览器地址栏看到的,实际传输的并不是

不必理会,只要源代码正常就行,我刚看了,在我这里源代码并没有改变,再说了源代码咱们会改变呢?

确实没改变,哈哈。 

将&改为&   记得加分号

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template