2012-07-26 66 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

相關問題