mac xampp php 无写入权限,Mac上安装xampp,无法获取到htdocs目录下的某些项目文件夹。...

Mac上安装xampp,无法获取到htdocs目录下的某些项目文件夹。

Access forbidden!

You don’t have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost

Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/5.6.30 mod_perl/2.0.8-dev Perl/v5.16.3

这是因为,Mac中有些文件夹是只对本机用户有读写权限,如果是服务器去访问这些文件夹,则会报forbid。

解决办法:

打开 Applications/XAMPP/xamppfiles/etc/httpd.conf,

搜索User/Group,

修改下面的User和Group, User修改为mac的用户名, Group修改为staff

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]:Notice: Undefined index: myfile inD:\XAMPP\htdocs\10.phpon line10Notice: Trying to access array offset on value of type null inD:\XAMPP\htdocs\10.phpon line10 。引用\[3\]:今天刚开始使用ajax通过js对php提交数据,结果我看php文件运行,总是出现有索引没有定义,一开始以为是什么比较大的事情,于是在这个地方纠结了很久,但是后来啊发现运行结果并没有因此受到影响,原来啊这个是php.ini配置文件问题,随着php的更新,有的时候一些功能没有实现同步。其实我们不必太在意啊。实在不行我们可以添加if(!empty($_GET\['q'\])){php文件}这样就没有了,,,,,具体原因,我也不知道,但是我想了很久,既然没影响,就不问了呗。。 问题:Undefined array key "num1" in D:\xampp\htdocs\xin\index.php on line 2 回答: 这个错误是由于在D:\xampp\htdocs\xin\index.php文件的第2行中,使用了一个未定义的数组键"num1"。这可能是由于在代码中没有为"num1"键赋值或者没有正确传递该键的值导致的。要解决这个问题,你可以检查代码中是否有为"num1"键赋值的地方,并确保正确传递了该键的值。另外,你还可以通过添加条件语句来检查该键是否存在,例如使用if(isset($_GET\['num1'\]))来避免出现这个错误。请注意,这个错误可能与你提到的php.ini配置文件有关,因为有时候一些功能可能没有实现同步。但是,如果你的代码运行结果没有受到影响,你可以不必过于在意这个错误。 #### 引用[.reference_title] - *1* [php报错:Notice: Undefined index: myfile in D:\XAMPP\htdocs\10.php on line 10](https://blog.csdn.net/weixin_48419914/article/details/115281182)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19](https://blog.csdn.net/whq19890827/article/details/40210833)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [ajax中url提交参数Undefined index: q in D:\xampp\htdocs\ajax.php on line 39](https://blog.csdn.net/datouniao1/article/details/52040486)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值