0

我今天发现 IE 和 Firefox 都给我一个错误,当我尝试使用基本表单(由 PHP 处理)向我的网站添加文章时,页面无法显示。一周前它还在工作,但我严重怀疑服务器管理员更改了 PHP 版本,因为我的代码没有任何变化。代码是:

<form action="?do=manage&act=article&action=edit&id='.$id.'&submit=true" enctype="multipart/form-data" method="post">
//several lines of code - inputs...
</form>

当我删除该enctype="multipart/form-data"部分时,它可以正常工作,只是无法再上传文件。这也是一个问题,因为我需要在文章中添加文件,而且这个问题也出现在我必须上传文件的相册中。

enctype 部分可能是问题所在吗?有没有人遇到过这个问题?

以下是有关服务器的一些信息: PHP API:20100412 Apache 版本:Apache/2.2.17 (Linux/SUSE)

4

2 回答 2

0

I've contacted my hosting provider and they resolved the issue. The problem was in configuration of the server. They updated the PHP version from 5.4.x to 5.5.x and forgot to change the config file to the way it was. So there was no file upload allowed and that's why my page was unable to load.

I hope this helps someone else with similar problem :)

于 2013-08-19T21:21:42.613 回答
0
  1. 可能 关闭了错误报告

  2. 破坏页面的错误可能是您的表单操作没有按照您认为的方式工作。

.

<form action="?do=manage&act=article&action=edit&id='.$id.'&submit=true" enctype="multipart/form-data" method="post">

应该

<form action="?do=manage&act=article&action=edit&id=<?= $id; ?>&submit=true" enctype="multipart/form-data" method="post">
于 2013-04-13T01:49:06.603 回答