Am I suppose to set the “file” and the “size” before I use the following, like is “file” a php thing or do I use a name of something?
This is what I’m asking about:
if($_FILES["file"]["size"] > 1000000){
}
Same question about the following:
else {
// everything was ok, so attempt to upload it
if(move_uploaded_file($_FILES["file"]["tmp_name"], $target)){
$date = date("D dS M,Y");
$time = date("h:i a");
print "The file has been uploaded!";
print $date " ";
print $time "
";
print "
Upload: " . $_FILES["file"]["name"];
print "
Type: " . $_FILES["file"]["type"];
print "
Size: " . $_FILES["file"]["size"];
print "
Stored In: " . $_FILES["file"]["tmp_name"];
$fs = fopen("txt/uploadhistory.txt", "a");
$fputs($fs, $data);
$fclose ($fs);
}
The only names that I got so far are:
$date
$time
$xname
$desc
$file
Should I create a $size, $type, $tmp_name and define them or what since those are being used in the $_FILES[“ ”][“ ”]; thingy?
2007-03-17
10:15:01
·
1 answers
·
asked by
Am
4
in
Computers & Internet
➔ Programming & Design
Oh come on y don't any1 ans my PHP q's it's been 30 min, I know they're PHP heads up in Y!Answers, so where yall @?!? Forums take like days or weeks that's y I'm in Y!Answers yall, PLEASE ans my Q?!?!?!
2007-03-17
10:50:58 ·
update #1