服务器用的是Windows2008的系统,安装PHP时出现
PHP Warning: rename(admin,admin): 锟杰撅拷锟斤拷锟绞★拷 (code: 5) in D:hnfxgwwwrootinstall.php on line 154
PHP Warning: file_put_contents(data/first.txt): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 158
PHP Warning: file_put_contents(conn/conn.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 163
PHP Warning: file_put_contents(conn/conn2.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 179
PHP Warning: file_put_contents(admin/../data/function.bas): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../data/api.bas): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../data/ajax.bas): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../data/data.bas): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/version.txt): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../js/scms.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../member/member_edit.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../member/member_news.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../install.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
PHP Warning: file_put_contents(admin/../search.php): failed to open stream: Permission denied in D:hnfxgwwwrootinstall.php on line 198
首先 看到网上说的
$filename = ‘test.txt’
if ( is_writable($name) ) {
file_put_contents($filename,”i am the contents”);
}else {
echo “can not write”;
}
用这个 is_writable函数判断能否写入。。
就这个is_writable($name) 函数,我也不懂为何,其实我不加这层判断,实际上是可以写入的。但是,一直就是返回 “can not write“。。。
作者:kingsley-sun
来源:CSDN
原文:https://blog.csdn.net/qq_31739317/article/details/73928037
版权声明:本文为博主原创文章,转载请附上博文链接!
首先 看到网上说的
$filename = ‘test.txt’
if ( is_writable($name) ) {
file_put_contents($filename,”i am the contents”);
}else {
echo “can not write”;
}
用这个 is_writable函数判断能否写入。。
就这个is_writable($name) 函数,我也不懂为何,其实我不加这层判断,实际上是可以写入的。但是,一直就是返回 “can not write“。。。
最后 我把判断删了 才发现其实可以写入
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。