|
我用書上php_file9.htm上傳圖片,在接收頁php_file9.php顯示的卻是原始碼: <?php if($_FILES["fileUpload"]["error"]==0){ if(move_uploaded_file($_FILES["fileUpload"]["tmp_name"], "./".$_FILES["fileUpload"]["name"])){ echo "上傳成功<br />"; echo "檔案名稱:".$_FILES["fileUpload"]["name"]."<br />"; echo "檔案類型:".$_FILES["fileUpload"]["type"]."<br />"; echo "檔案大小:".$_FILES["fileUpload"]["size"]."<br />"; }else{ echo "上傳失敗! "; echo "<a href='javascript:window.history.back();'>回上一頁</a>"; } } ?> 在php.ini中也修改了設定並重開伺服器: file_uploads = On upload_max_filesize = 8M upload_tmp_dir = "C:\Windows\Temp" 但卻都不行,請問還有哪邊是我沒設定好的呢? |