我已将IS_USRS的完全权限添加到/ courseimages /文件夹中,但仍无法上传文件:
$feedback = "&img".$index."=$img";
echo "<p>img: $img</p>";
echo "<p>tmp_name: $tmp_name</p>";
echo "<p>PHP User: ".exec('whoami')."</p>";
if ( ! is_writeable ( "../courseimages/$img" ) )
{
echo "<p>Can't write to directory, insufficient permissions.</p>";
}
if(move_uploaded_file($tmp_name, "../courseimages/$img")){
$feedback .="&moved=true";
}else{
$feedback .="&moved=false";
}
echo $feedback;
resize_image("../courseimages/$img", "../courseimages/$img");
产生:
img: 212_1862_6918_Rambow_Corgi.jpg
tmp_name: C:\Windows\Temp\php411.tmp
PHP User: nt authority\iusr
权限不足,无法写入目录。
&img1=212_1862_6918_Rambow_Corgi.jpg&moved=falseUpload: Rambow Corgi.jpg
但设置了权限:
我读了很多文章,尝试了很多事情,我想不通-预先感谢