Swf和我想上傳一個圖片文件。代碼如下。問題是什麼?如何上傳Flash遊戲網站的簡單swf?
if ($_FILES["o_img"]["error"] > 0 and $_FILES["o_swf"]["error"] > 0)
{
echo "Return Code: " . $_FILES["o_img"]["error"] . "<br />";
echo "Return Code: " . $_FILES["o_swf"]["error"] . "<br />";
}
else
{
if (file_exists("../resimler" . $_FILES["o_img"]["name"]) and file_exists("../swf" . $_FILES["o_swf"]["name"]))
{
echo $_FILES["o_img"]["name"] . "bu isimde bir resim daha önce yüklenmiş ";
echo $_FILES["o_swf"]["name"] . "bu isimde bir resim daha önce yüklenmiş ";
}
else
{
move_uploaded_file($_FILES["o_img"]["tmp_name"],
"upload/" . $_FILES["o_img"]["name"]);
move_uploaded_file($_FILES["o_swf"]["tmp_name"],
"upload/" . $_FILES["o_swf"]["name"]);
}
}
我的表格:
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p>
<input type="text" name="o_baslik" id="o_baslik" />
: Oyun İsmi</p>
<p><br />
<input type="text" name="o_etiketler" id="o_etiketler" />
:
Oyunun Etiketleri</p>
<p><br />
<input type="file" name="o_img" id="o_img" />
:Oyun Resmi </p>
<p><br />
<input type="file" name="o_swf" id="o_swf" />
SWF Dosyası<br />
</p>
<input type="submit"/>
</form>
我的錯誤=
Warning: move_uploaded_file(upload/71IwNCX6PhL__SL1500_.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\AppServ\www\tasarim\admpanel\yeni.php on line 65
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\phpD014.tmp' to 'upload/71IwNCX6PhL__SL1500_.jpg' in C:\AppServ\www\tasarim\admpanel\yeni.php on line 65
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\tasarim\admpanel\yeni.php:6) in C:\AppServ\www\tasarim\admpanel\yeni.php on line 77
有** NOT **這樣的詞作爲「codes」! – daGrevis
檢查腳本是否具有對該文件夾的寫入權限。另外,你的腳本有安全漏洞。如果我上傳一個PHP文件會怎麼樣? – kapa
您是否收到任何錯誤? –