How would I go about making a new file in another folder seperate from the one the script is in?
My current script is as follows:
<?
//create the info array.
$info[0]="temp" . rand(0, 999) . ".fa";
$info[1]=$orginalname;
$info[2]=$username;
$info[3]="/" . $username. "/";
print ($info[0]);
print ($info[1]);
print ($info[2]);
print ($info[3]);
//define the content
$content .= "<div align=center valign=middle><font face=\"Verdana\" size=1>";
$content .= "Welcome to" . $info[2] . "'s website!";
$content .= "</font></div>";
//establish connection to write temp. file.
$fp = fopen($info[0], "w+");
//write the file
fwrite($fp, $content);
//close the file stream
fclose($fp);
//copy the file to the user's directory
copy($info[0], $info[3]);
//delete the temporary file
unlink($info[0]);
//rename the file!
rename($info[3] . $info[0], $info[3] . $info[1]);
?>