我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

文件存在,但我无法使用PHP打开它

I can open and write in file using vim command but i cant open it using PHP

$myFile = "v.txt"; 
if(!file_exists($myFile)){
    print 'File not found';
}else if(!$fh = fopen($myFile, 'w+')){
    print 'Can\'t open file 
';}.
else{  
    print 'Success open file';
}

Do a

ls -l

on the directory that contains the file. Make sure the user that's running your web server has access read rights to the file

近期文章

  • 使用php和mysql创建动态菜单
  • 两个从正常表格和模态表格提交
  • 无法显示有关用户的详细信息(codeigniter)
  • 在nginx转发后保持域名相同?
  • DateTime对象生成不正确的结果
  • 自定义帖子类型/分类法用户关联
  • Knockout Js功能没有出现在页面上
  • 如何覆盖奏鸣曲管理员中的显示字段
  • 在正则表达式中包含匹配的部分
  • 错误400使用Curl在Alfresco上传PDF
  • 在几秒钟内隐藏woocommerce消息
  • 如何将帖子类别显示为类
  • 访问PHP json_encode中的嵌套值
  • 使用define()时未定义的变量错误
  • PHP Twitter Oauth只是检索提要
  • 无法使用PDO显示查询结果
  • PHP在循环中随机打印文本
  • 使用PHP从url检索XML信息
  • 使用.htaccess将URL重定向到子目录
  • 以'.php'结尾的Laravel路线不起作用

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华