简体   繁体   中英

MKDIR php command does not create the folder

I am trying to create a folder for my user once they registered, however even though there is no error with the syntax it still does not want to create the folder. Do I need to edit any of my server php configurations?

$dirpath = "/users/".$username;
mkdir($dirpath);

Try

<?php
$dirpath = "/users/".$username;
mkdir($dirpath, 0700);
?>

The mode is 0777 by default, which means the widest possible access. For more information on modes, read the details on the chmod() page.

If you're working on Windows OS mode is ignored.

您需要确保您的网络服务器运行的任何用户的目录“ / users”都是可写的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM