Home Backend Development PHP Tutorial php 创建文件夹异常

php 创建文件夹异常

Jun 13, 2016 pm 01:04 PM
mkdir path

php 创建文件夹错误

D:\work3\sinykkphp\includes\upload\userfile/2011/01/12/create dir


Warning : mkdir() [function.mkdir ]: No such file or directory in D:\work3\sinykkphp\test-sinykk.php on line 13

?

?

mkdir($path,0777);? 不能同时建两级目录

?

要用循环一个一个建目录如

?

$i = 0;
while (!@mkdir($path, 0777)) {
 if (is_dir($path)) break;
 $i ++; 
 if (@mkdir($path . str_repeat("/..", $i), 0777)) $i = 0;
}
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Steps to set the PATH environment variable of the Linux system Steps to set the PATH environment variable of the Linux system Feb 18, 2024 pm 05:40 PM

How to set the PATH environment variable in Linux systems In Linux systems, the PATH environment variable is used to specify the path where the system searches for executable files on the command line. Correctly setting the PATH environment variable allows us to execute system commands and custom commands at any location. This article will introduce how to set the PATH environment variable in a Linux system and provide detailed code examples. View the current PATH environment variable. Execute the following command in the terminal to view the current PATH environment variable: echo$P

How to set the path environment variable How to set the path environment variable Sep 04, 2023 am 11:53 AM

Method to set the path environment variable: 1. Windows system, open "System Properties", click the "Properties" option, click "Advanced System Settings", in the "System Properties" window, select the "Advanced" tab, and then click "Environment Variables" " button, find and click "Path" to edit and save; 2. For Linux systems, open the terminal, open your bash configuration file, add "export PATH=$PATH: file path" at the end of the file and save it; 3. For MacOS system, the operation is the same as above.

How to correctly set the PATH environment variable in Linux How to correctly set the PATH environment variable in Linux Feb 22, 2024 pm 08:57 PM

How to correctly set the PATH environment variable in Linux In the Linux operating system, environment variables are one of the important mechanisms used to store system-level configuration information. Among them, the PATH environment variable is used to specify the directories in which the system searches for executable files. Correctly setting the PATH environment variable is a key step to ensure the normal operation of the system. This article will introduce how to correctly set the PATH environment variable in Linux and provide specific code examples. 1. Check the current PATH environment variable and enter the following command in the terminal

How to configure path environment variable in java How to configure path environment variable in java Nov 15, 2023 pm 01:20 PM

Configuration steps: 1. Find the Java installation directory; 2. Find the system environment variable settings; 3. In the environment variable window, find the variable named "Path" and click the edit button; 4. In the pop-up edit environment variable window , click the "New" button, and enter the Java installation path in the pop-up dialog box; 5. After confirming that the input is correct, click the "OK" button.

The role and importance of the PATH environment variable in Linux The role and importance of the PATH environment variable in Linux Feb 21, 2024 pm 02:09 PM

"The Role and Importance of the PATH Environment Variable in Linux" The PATH environment variable is one of the very important environment variables in the Linux system. It defines which directories the system searches for executable programs. In the Linux system, when the user enters a command in the terminal, the system will search one by one in the directories listed in the PATH environment variable to see if the executable file of the command exists. If found, it will be executed. Otherwise, "commandnotfound" will be prompted. The role of the PATH environment variable: Simplified

Quickly master the usage skills of Linux command mkdir Quickly master the usage skills of Linux command mkdir Mar 19, 2024 pm 03:06 PM

Linux system is an operating system widely used in servers and personal computers, with rich command line tools. Among them, the mkdir command is one of the common commands used to create directories. This article will introduce how to quickly master the use of mkdir command, and attach specific code examples. 1. Basic syntax The basic syntax of mkdir is as follows: mkdir [option] directory name where [option] represents optional parameters, and directory name is the name of the directory to be created. The following are some commonly used options: -p: recursively create the directory

How to configure path in java environment variables How to configure path in java environment variables Apr 22, 2023 pm 06:49 PM

1. Find the bin directory under the jdk installation directory and copy it. 2. Click Computer and select Properties; 3. Select Advanced, Environment Variables; 4. Paste at the path line. Note the English half-width symbol (;) at the end. Administrator user variables are only for Used by the administrator user, system variables can be used by all users. Among environment variables, path is used to ensure that java commands are executed under the path. It can be said to be an indispensable link in environment variable configuration.

How to use file separator and path separator in Java? How to use file separator and path separator in Java? Apr 21, 2023 pm 02:40 PM

1. File delimiters File delimiters are characters used to separate directory names that constitute a path to a specific location. 1. Get the file delimiter In Java, there are several ways to get the file delimiter. We can use File.separator to get the separator of String. StringfileSeparator=File.separator; We can also use File.separatorChar to obtain the character of this separator. charfileSeparatorChar=File.separatorChar; Starting from Java7, we can also use the file system. StringfileSeparator=F

See all articles