Oligonicella
New member
Having a problem creating directories. I can determine if they exist or not but not create them. The following is the code:
if(!file_exists($novelsDir))
{ print “StatusBanner.flashErr(“Base novel directory doesn’t exist”);”;
print “deBug.line(‘crtNvl’,“Base doesn’t exist”);”;
exit;
}
print “deBug.line(‘crtNvl’,”$novelsDir does exist");";
$dr = “$novelsDir/$title”;
if(file_exists($dr))
{ print “StatusBanner.flashWarning(‘Novel directory for $title already exists.’);”;
print “deBug.line(‘crtNvl’,“novel dir $title already”);”;
exit;
}
print “deBug.line(‘crtNvl’,”$dr does not exist");";
#print “deBug.line(‘crtNvl’,“attempting mkdir on $dr”);”;
The following are the results from several tests:
****** This is to demonstrate an existing directory.
crtNvl:: J://Publishing/Webs/Data/novels does exist
crtNvl:: novel dir Idol Hands already
****** These lines occur in all following tests…
crtNvl:: J://Publishing/Webs/Data/novels does exist
crtNvl:: J://Publishing/Webs/Data/novels/Money does not exist
****** Test to use the direct name…
crtNvl:: attempting mkdir on J://Publishing/Webs/Data/novels/Money
(This is the popup)
PHP Warning: mkdir(): No such file or directory in J:\Webs\php\local\novels\createNovel.php
****** Test with the realpath …
crtNvl:: attempting mkdir on J
ublishingWebsData ovelsMoney – aka: J://Publishing/Webs/Data/novels/Money
(This is the popup)
HP Warning: mkdir(): File exists in J:\Webs\php\local\novels\createNovel.php
Absolute path disabled or enabled with J:\Publishing\Webs\Data or X:\Data\ in the path fails in all cases.
Is there some setting I’m missing that allows me to create (sub)directories?
if(!file_exists($novelsDir))
{ print “StatusBanner.flashErr(“Base novel directory doesn’t exist”);”;
print “deBug.line(‘crtNvl’,“Base doesn’t exist”);”;
exit;
}
print “deBug.line(‘crtNvl’,”$novelsDir does exist");";
$dr = “$novelsDir/$title”;
if(file_exists($dr))
{ print “StatusBanner.flashWarning(‘Novel directory for $title already exists.’);”;
print “deBug.line(‘crtNvl’,“novel dir $title already”);”;
exit;
}
print “deBug.line(‘crtNvl’,”$dr does not exist");";
#print “deBug.line(‘crtNvl’,“attempting mkdir on $dr”);”;
#mkdir($dr);
$rl = realpath($dr);
print “deBug.line(‘crtNvl’,“attempting mkdir on $rl – aka: $dr”);”;
mkdir($rl);
exit;
The following are the results from several tests:****** This is to demonstrate an existing directory.
crtNvl:: J://Publishing/Webs/Data/novels does exist
crtNvl:: novel dir Idol Hands already
****** These lines occur in all following tests…
crtNvl:: J://Publishing/Webs/Data/novels does exist
crtNvl:: J://Publishing/Webs/Data/novels/Money does not exist
****** Test to use the direct name…
crtNvl:: attempting mkdir on J://Publishing/Webs/Data/novels/Money
(This is the popup)
PHP Warning: mkdir(): No such file or directory in J:\Webs\php\local\novels\createNovel.php
****** Test with the realpath …
crtNvl:: attempting mkdir on J
(This is the popup)
HP Warning: mkdir(): File exists in J:\Webs\php\local\novels\createNovel.php
Absolute path disabled or enabled with J:\Publishing\Webs\Data or X:\Data\ in the path fails in all cases.
Is there some setting I’m missing that allows me to create (sub)directories?