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

fopen()权限被拒绝

I have an issue that I cannot create any files using fopen.

I am using this as a test:

<?php
$myfile = fopen("testfile.txt", "w")
?>

and this error is output in NewRelic (and no testfile.txt is not created):

fopen(testfile.txt): failed to open stream: Permission denied

It's because you don't have the right to open it. Make sure you have the right to write. If on linux you can use chmod() to set the the right of the file.

近期文章

  • 如何在表单提交上创建新页面?
  • 使用DOMDocument()在php中创建XML文件
  • 调用未定义的方法query \ builder :: with()
  • Memcache ::不使用键数组
  • 使用PHP永久编辑HTML文件
  • Symfony:在控制器中使用闪存包时输入错误
  • 检索统计应用安装在PHP中Play商店Google API [关闭]
  • 从上传的Excel文件中读取日期
  • 是否可以将PHP函数设置为在一天内执行?
  • 如何将我的查询值传递给使用AJAX输入字段
  • 检查文件夹中的所有图像并将第一个图像存储到阵列
  • 使用php运行多级mysqli查询的最有效方法
  • MySQL Cursor在select语句中带有变量
  • 我如何在<php>标签中调用它?
  • 为什么我的临时文件在/ tmp文件夹中不可写 - linux server(centos)
  • Jquery根据.load请求的输出禁用或启用操作按钮
  • 返回所有用户的每个用户的帖子和每个帖子的评论laravel
  • 如何在Notification android上设置onclicklistener
  • 如何在Helper类中获取根路径 - Symfony2
  • 使用md5版本的id查询字段

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华