"或者""/> "或者"">
Home > Backend Development > PHP Tutorial > 怎么通过javascript向php服务器传送字符串

怎么通过javascript向php服务器传送字符串

WBOY
Release: 2016-06-13 12:30:46
Original
663 people have browsed it

如何通过javascript向php服务器传送字符串
有一个页面,特定用户登录后,可以在该页面中输入mysql查询命令.
php服务器接收到该命令后,直接将该命令字串传给mysql执行,再将结果显示在该页面上.

刚开始在javascript中将该可编辑控件的内容直接传向服务器,不行,该命令字串中的">"或者"
后又将该字串用javascript的encodeURIComponent函数转换后发送,在服务器端再用php的html_entity_decode函数转换回来,这样子呢,我所使用的大部分命令可以了,只是命令中的引号就不正常了.

查来查去,找不到方法了,一个字串,在网络中传送竟然太多的麻烦了.
请解惑!

Related labels:
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