我想directory
在页面脚本中创建一个:
$critere = array();
$critere["bien_code"] = read_post_int("pk");
$name = "parcelle_". $photo->lireBienPhotoSeq().".png";
if ( ! file_exists (RP_PHOTO_PARCELLE) )
mkdir(RP_PHOTO_PARCELLE, 0777, true);
$dest = RP_PHOTO_PARCELLE . $name;
问题是,在rights
的directory
就是755,当我做一个ls -l
在服务器!那么,为什么恐怖分子的权利不是777?
chmod
创建目录后尝试使用。
所以你的代码应该看起来像这样
$critere = array();
$critere["bien_code"] = read_post_int("pk");
$name = "parcelle_". $photo->lireBienPhotoSeq().".png";
if ( ! file_exists (RP_PHOTO_PARCELLE) )
mkdir(RP_PHOTO_PARCELLE, 0777, true);
chmod(RP_PHOTO_PARCELLE, 0777); //<------ new line added for giving access
$dest = RP_PHOTO_PARCELLE . $name;
注意:提供对文件夹的0777访问不是一个好主意。它涉及参与看高安全性risk.For风险在这里和这里。如果你理解的风险,仍然给0777访问使用它,否则请尽量避免它需要
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句