PHP-即使IS_USRS拥有权限,move_uploaded_file在Windows服务器上也不起作用

时间:2019-03-10 11:22:11

标签: php windows permissions

我已将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

但设置了权限:

enter image description here

我读了很多文章,尝试了很多事情,我想不通-预先感谢

0 个答案:

没有答案