我有一个用php编写的示例图片上传代码。一个ios开发者调用Web服务。文件上传适用于One服务器,但无法在另一台服务器上传。如何编辑htacess文件以支持文件上传
检查权限,目录列表等在上述所有尝试上传图像时,Server会引发500内部错误。
我觉得可能是用的.htaccess
一个问题,任何人都可以指导我,所以它支持图片上传编辑htaccess的。
谢谢。 通过浏览器上传时,文件上传工作正常。它没有返回任何错误
这里是错误日志 PHP警告:fopen(xml /)[function.fopen]:未能打开流:没有这样的文件或目录在/ home/appsimon/public_html/api/271行import.php
实际上它在这台服务器上工作到上周。突然文件上传htaccess的失败
代码
#old php Handler
#deny from all
#allow from ip address
只有这3个注释行 错误从应用程序控制台
<Warning>: aResponse:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
[email protected] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<p>Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
Feb 6 00:30:48 Varmas-iPhone SNMC[1944] <Warning>: -JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x541a40 {NSLocalizedDescription=Unrecognised leading character}"
)
Feb 6 00:30:49 Varmas-iPhone SNMC[1944] <Warning>: fail
什么在您的错误日志? –
显示你的htaccess,因为错误500可能意味着你的htaccess有错误。 –
在htaccess文件中没有任何东西被评论。它的一个Linux服务器 –