1, when i'm doing a file upload, and i specify a directory, let say the php file is in a directory called home, and it want to write to a directory in home called uploads,
aka, home > uploads
should the code read this?
$dir="./uploads";
if(!copy($file, "$dir/$file")) echo "Could not copy file";
else echo "copied okay";
or should the $dir = 'uploads'? or "uploads/"
also, in my code, the copy command is written like this
if(!@copy($file, "$dir/$file") blah blah
what's the purpose of the at sign before the copy string? should it be there or did the book do a typo? it does that twice!, and when I do up in the @ sign, it come back with a different error then when I dont, so I dont know which works.