PHP安装出现错误-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

PHP安装出现错误

冷月葬相思 2018-10-31 16:38:02 5675

服务器用的是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

JavaScript PHP
分享到
取消 提交回答
全部回答(1)
  • 搞么罗
    2019-07-17 23:11:34

    首先 看到网上说的

    $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“。。。

    最后 我把判断删了 才发现其实可以写入

    0 0
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题