mkdir在PHP中不起作用 [英] mkdir not working in PHP

查看:200
本文介绍了mkdir在PHP中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的两个小时中,我一直在拔头发,并确保我做的事情确实很愚蠢.

Have been pulling out my hair for the past 2 hours on this and am sure I am doing something really stupid.

<?php
mkdir("blah", 0777);
?>

这通过命令行工作,并且文件夹被创建.但是,当我尝试通过浏览器运行同一件事时,它是行不通的.有文件权限问题吗?

This works through the command line and the folder gets created. But the same thing doesn't work when I try to run it through the browser. Any file permission issues?

推荐答案

是否可能是在命令行下运行时脚本继承了您的权限,但是从浏览器中运行时却没有?

Could it possibly be that while running under the command line, the script inherits your permissions, but when running from the browser it doesn't?

在这种情况下,您希望使目录的权限为写"组.

In that case you would want to make your directory permissions 'write' for group.

这篇关于mkdir在PHP中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆