2011-02-09 64 views
0

上載MP4視頻$ _FILES數組就這樣產生了..問題上傳FLV視頻文件服務器

Array 
    (
     [qqfile] => Array 
      (
       [name] => video.mp4 
       [type] => video/mpeg4 
       [tmp_name] => /tmp/php74N9mR 
       [error] => 0 
       [size] => 199160 
      ) 

    ) 

但同時上傳。FLV文件$ _FILES數組來這個樣子,爲什麼不來合適?

Array 
(
    [qqfile] => Array 
     (
      [name] => YouTube - My Youtube Contest Announcement.flv 
      [type] => 
      [tmp_name] => 
      [error] => 1 
      [size] => 0 
     ) 

) 

請建議。

回答

2

您嘗試上傳的文件太大。從the PHP manual's chapter on file uploads

自PHP 4.2.0,PHP返回一個適當的錯誤代碼與文件陣列沿。錯誤代碼可以在PHP文件上傳過程中創建的文件數組的錯誤段中找到。換句話說,錯誤可能在$ _FILES ['userfile'] ['error']中找到。

...

UPLOAD_ERR_INI_SIZE

值:1;上傳的文件超出了php.ini中的upload_max_filesize指令。

0

我認爲它關係到你上傳的文件名,

,當你調用PHP函數與''

包文件名