Hi guys,
I'm creating a folder dynamically and ssaving a php file in that folder. I want that users when provide with the link should be able to access the file as http://mysite/users/<myfolder>
It gives a page not found error, but thru FTP I can actually see the file exists there.
Pls help.
Thnx
Abhra
File access problem
Moderator: General Moderators
Here's the code
Now this is creating the index.php in the designated dir under 'users' dir.
But when accessed thru browser http://mydomain/users/[i]<userdir>[/i] its giving file not found error.
Thnx
Abhra
Code: Select all
function createCustDir($custName,$cid)
{
$custDir = $custName;
chdir('users');
if(!($dp = mkdir($custDir,0777))) die("Error creating dir");
if(file_exists($custDir))
{
<some html content stored in $strPageContent>
chdir($custDir);
if(!($fp = fopen("index.php","a"))) die("Error opening dir");
fwrite($fp,$strPageContent);
fclose($fp);
}
}But when accessed thru browser http://mydomain/users/[i]<userdir>[/i] its giving file not found error.
Thnx
Abhra