我的 php 脚本有问题
我有一个表格,要求提供姓名、电子邮件、邮政编码。然而问题是。当您点击提交时。它要求您打开文件,但不会转到脚本。
I have a form where it request name,email,zipcode. However the problem is that. when you click on submit. it ask you to open the file it doesn't go to the script.
The website is http://childcarelv.org/newsletter.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的服务器不处理 PHP。相反,它只是直接输出到浏览器。
这是服务器配置问题。
您的服务器配置了正确的 MIME 类型(它返回 application/x-httpd-php),但未设置为实际使用 PHP 来处理它。
由于您使用的是 Apache,请阅读此处的配置说明: http://www .php.net/manual/en/install.unix.apache2.php
看起来您可能正在使用 ipower.com 进行托管。如果真是这样,这就是他们需要解决的问题。
PHP isn't being handled by your server. Instead, it is just being output straight to the browser.
This is a server configuration issue.
Your server is configured with the correct MIME type (it is returning application/x-httpd-php), but isn't set up to actually use PHP to process it.
Since you are using Apache, read the configuration instructions here: http://www.php.net/manual/en/install.unix.apache2.php
Looks like you might be hosting with ipower.com. If that is the case, this is an issue for them to solve.
从您的描述来看,服务器似乎无法执行 php 脚本,因此将其作为下载提供给客户端。
您应该尝试将以下代码放入名为 testphp.php 的文件中,并放置在公共主目录中,然后转到该页面查看 php 扩展名是否映射到服务器上的 php 模块。
这只是为了验证/证明您的脚本没有任何问题,即使是简单的测试脚本也无法工作。
From your description it seems that server is not able to execute the php script, and thus gives it as download to the client.
You should try to put the following code in a file named testphp.php and place in your public home directory and go to the page to see if php extension is mapped to the php module on your server.
This is just to verify/prove that there is nothing wrong in your script, and even a simple test script won't work.