Its been a long time since i used php and i need some help regarding this basic function.
{
$msg .= " File Name: " . $_FILES['fileToUpload']['name'] . ", ";
$msg .= " File Size: " . @filesize($_FILES['fileToUpload']['tmp_name']);
@unlink($_FILES['fileToUpload']);
}
Suppose i have a file in the $_FILES['fileToUpload']
, how do i create an upload dir if it does not exist, and save the file there?
Thanks!
use is_dir() to check if the directory exitst http://us.php.net/manual/en/function.is-dir.php
then use mkdir() if it doesn't exist http://us.php.net/manual/en/function.mkdir.php