Write a simple PHP Setup folder code,
The main first gets the path of the current directory, and then determines whether the folder exists and does not exist to create.
<?phpdefine (' Dir_root ', str_replace (' \ \ ', '/', dirname (__file__)));//Gets the current file physical path $tmp_file_path = dir_root. ' /tmp/';//Add the path to the TMP directory under the root directory if (Is_dir ($tmp _file_path)) echo "Tmp folder exists! "; Else{mkdir ($tmp _file_path, 0700);//If the TMP directory does not exist, then establish the echo" TMP folder does not exist, try to build success!
";//did not detect whether the establishment was successful echo" TMP directory is ". $tmp _file_path;}? >
http://www.bkjia.com/PHPjc/938854.html www.bkjia.com true http://www.bkjia.com/PHPjc/938854.html techarticle write a simple PHP set up the folder code, the main first to get the current directory path, and then determine whether the folder exists, does not exist to create. Phpdefine (' Dir_root ', str_replace (' \ \ ...