can PHP only create directories on the local server site with the directory? Can't I create it on another disk?
PHP Code
!--Code highlighting produced by Actipro Codehighlighter (freeware) http://www. codehighlighter.com/-->!--? php function copydir ($DIRSRC, $dirTo) {if (Is_file ($dirTo)) {echo "target is not a directory Cannot create "; return; } if (!file_exists ($dirTo)) {mkdir ($dirTo); if ($dir _handle= @opendir ($DIRSRC)) {while ($filename = Readdir ($dir _handle)) {if ($filename! = "." && $filename! = "...") {$subSrcFile = $dirSrc. " \ \ ". $filename; $subToFile = $dirTo. " \ \ ". $filename; if (Is_dir ($subSrcFile)) {copydir ($subSrcFile, $subToFile); } if (Is_file ($subSrcFile)) {copy ($subSrcFile, $subToFile); }}} closedir ($dir _handle); }} copydir ("myphp", "d:\\admin"); -->
You can create a drive letter. Don't know why not copy to other disk
An error occurs when the drive letter is added
such as: Warning:is_file () [Function.is-file]: Open_basedir restriction in effect. File (D:\admin) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 3
Warning:file_exists () [function.file-exists]: Open_basedir restriction in effect. File (D:\admin) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 7
Warning:mkdir () [Function.mkdir]: Open_basedir restriction in effect. File (D:\admin) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 8
Warning:is_file () [Function.is-file]: Open_basedir restriction in effect. File (D:\admin\file) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 3
Warning:file_exists () [function.file-exists]: Open_basedir restriction in effect. File (D:\admin\file) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 7
Warning:mkdir () [Function.mkdir]: Open_basedir restriction in effect. File (D:\admin\file) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 8
Warning:copy () [function.copy]: Open_basedir restriction in effect. File (D:\admin\file\wo.txt) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 21
Warning:copy (D:\admin\file\wo.txt) [Function.copy]: failed to open stream:operation not permitted in E:\web\copyFile.ph P on line 21
Warning:copy () [function.copy]: Open_basedir restriction in effect. File (D:\admin\in.txt) is not within the allowed path (s): (E:\web) in E:\web\copyFile.php on line 21
Warning:copy (D:\admin\in.txt) [Function.copy]: failed to open stream:operation not permitted in E:\web\copyFile.php on L Ine 21
------Solution--------------------
You this is a variety of mistakes, the path is wrong, the authority is wrong, self-check clearly.
Are you a virtual host?