I have a problem linking files from a directory created by PHP.
The script creates the directory OK. I can chmod it and do anything I want with it throught PHP. A hyperlink is created for the newly created directory and when clicked goes to that directory.
Sorry a long winded way of saying it's a directory browser with some utilities attached.
When I upload a file to the directory a hyperlink to the file is created. This is the bit that doesn't work. I get a 500 error from the server when I click the link created. There is nothing wrong with the link. When I examine it in the browser status bar it is as it should be.
The directory is visible to the PHP script and can be listed using the script, it is also listed when I go on the box to check all the permissions and owners are as they should be, but, when the directory is listed as a bog standard list - not using PHP - i.e. the server directory list. The directory created by PHP is not visible.
Here's the code that does the creating.
$dir is passed from a form and $directorypath is the path to the place to create the directory. This bit works. The directory is created in the right place.
$strObject_Directory = $directorypath."/".basename($dir);
$dirmode = 0775;
$oldmask = umask(0);
if(!mkdir($strObject_Directory, $dirmode))
{
$strMessage = "directory not created.";
}
else
{
chmod($strObject_Directory, $dirmode);
umask($oldmask);
}
Any help would be appreciated. I've scoured the boards today to no avail.
Thanks,
colbrick