2012-07-26 62 views
0

当前我正在将文件上传到服务器。一旦文件上传,我得到timthumb到一个调整大小和复制到另一个位置。使用复制()将timthumb输出保存到服务器()

copy(timthumb_image_address, new_server_address); 

到目前为止,这一直在运行得非常好。 Timthumb工作正常,但我无法正确复制到服务器。我现在制作无效文件。

保存文件的文件夹是可写的。我可以真正进入并下载它。但我不能在下载查看图像本身,或在浏览器中

没有错误消息

这里是我一直在使用

副本()第1部分一些虚拟地址:

http://mywebsite.com/timthumb.php?src=/home/usernamehere/public_html/images/uploads/imagetocopy.jpg&w=32&h=32 

拷贝()部分2:

/home/usernamehe/public_html/images/uploads/imagetocopy_v2.jpg 

它提出了文件大小533个字节。无论如何,这总是我在filezilla中看到的大小。

我知道它的一个无效图像的唯一方法是因为没有东西可以打开它。而皮卡萨说它是一个无效的图像。尽管有一个.jpg扩展名的方式。

任何想法?

+0

这需要更多的信息。你有什么信息吗?新的服务器地址是什么样的,你能举个例子吗? “无效文件”究竟意味着什么 - 它们包含什么,它们有多大?源文件是否存在?目标路径是否可写? – 2012-07-26 12:02:17

+1

你是对的,对不起,请更新它 – cardi777 2012-07-26 12:08:22

+1

你可以用文本编辑器查看533字节文件之一吗? – 2012-07-26 12:14:26

回答

0

好的,我想我解决了它。我认为这是因为我戴上了apache密码保护。该文件本身有一个401错误信息

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
<html><head> 
<title>401 Authorization Required</title> 
</head><body> 
<h1>Authorization Required</h1> 
<p>This server could not verify that you 
are authorized to access the document 
requested. Either you supplied the wrong 
credentials (e.g., bad password), or your 
browser doesn't understand how to supply 
the credentials required.</p> 
<p>Additionally, a 401 Authorization Required 
error was encountered while trying to use an ErrorDocument to handle the request.</p> 
</body></html> 
+0

我们该如何解决这个问题?我也有同样的问题。我有密码,如何输入密码? – 2012-08-08 11:01:17

相关问题