gpt4 book ai didi

PHP 表单无法通过 GET 和 POST 方法传递少量值

转载 作者:太空宇宙 更新时间:2023-11-04 03:34:20 25 4
gpt4 key购买 nike


我们正在尝试通过 PHP 中的 URL 传递值。我们在 Web 表单中使用 GET 方法来发送 PHP 表单值。但它没有抛出任何错误并返回主页。
例如:
我们有 3 页
1)index.html(我们已将.htaccess索引页面配置为index.html)
2)input.php(它有网络表单,名称作为输入框和提交按钮。表单有action method=GET和action=result)
3)result.php(使用$_GET["value"]从URL获取值并使用echo显示该值)

当我将 url 传递为 http://samsungmobileservicecenterinchennai.com/name.php?value=having+t% 时从 input.php 路由到 index.html 而不显示任何错误。
但是,当我们传递末尾没有 % 的相同网址(即 http://samsungmobileservicecenterinchennai.com/input.php?value=having+t% )时,它会正确移动到 result.php 并在 result.php 页面中显示该值

 For all your reference I have created 2 pages input.php and result.php1) input.php (http://samsungmobileservicecenterinchennai.com/input.php) - pass this value in 
name ="[vc_row][vc_column][vc_column_text]having[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][/vc_row]"
it will return to index page without any error.2)pass following value in
name="[vc_row][vc_column][vc_column_text]it may occur's error[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][/vc_row]"
it moves to second page without any error.

当我们在本地服务器上做同样的事情时,它工作得很好。仅在我们的网络空间托管公司提供的共享网络服务器中它不起作用。请让我知道如何解决此问题。

我的共享网络空间服务器详细信息。

cPanel 版本 11.50.0(内部版本 29)
主题x3
Apache 版本 2.4.12
PHP 版本 5.5.26
MySQL 版本 5.5.42-cll
架构x86_64
操作系统Linux
共享IP地址198.23.58.79
sendmail 的路径/usr/sbin/sendmail
Perl 的路径/usr/bin/perl
Perl 版本 5.10.1
内核版本2.6.32-531.29.2.lve1.3.11.10.el6.x86_64
cPanel Pro 1.0 (RC1)

谢谢!

最佳答案

问题已解决。问题在于网络托管公司。他们在 cpanel 中启用了“modsecurity”工具。一旦在 cpanel 中禁用了 modsecurity 工具,wordpress 就可以正常工作了。感谢大家的支持。

关于PHP 表单无法通过 GET 和 POST 方法传递少量值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32131883/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com