okay i am in the making of a file upload script for my game so they can upload thier own custom pic... see the problem is i wanted it to go to members/"thierid"/whatever.png but idk how to add thier id as a folder...
Thanks in advance,
Storm Shadow
When this problem is re examined, you will see that it's not really an upload issue, it's a matter of creating directories on the server. As such all you need is to figure out the userId from the session information and to create a directory on the server to match that. You can also make use of the file_exists() call to find out if the directory is already present.
The numbers are chmod, basically chmod refers to setting the access privledges for a file. You you can do a quick search for more infomation about chmod.
Quote:
Originally Posted by stormshadow
and for the "file_exists() call" how do i use that?
PHP Code:
<?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>