php upload images???
Out of context: Reply #7
- Started
- Last post
- 22 Responses
- tobor0
Make sure you have the right directory listing.
Check where your folder is in php, with the phpinfo(); function.-------------------
<?php
echo ini_set('upload_max_filesize', '41943040')."
";
echo ini_set('post_max_size', '40MB')."
";
echo ini_set('max_execution_time', '720');$file_dir="/home/virtual/site300/fst/var/subdomain/webmaster/html/uploader/holder";
$file_url="http://www.your-site.com/uploader/holder";foreach ( $HTTP_POST_FILES as $file_name => $file_array ) {
$proper_name = $project."/".$file_array['name...
print "path: ".$file_array['tmp_name']."
";$msg = $email_message."
";
$msg .= "A file has been uploaded here:
$file_url/$proper_name
Regarding project $project.";
$msg .= "Statistical info regarding file:
";
$msg .= "-------------------------------...
";
$msg .= "name: ".$file_array['name']."
";
$msg .= "type: ".$file_array['type']."
";
$msg .= "size: ".$file_array['size']."bytes
";$return_print = "";
if ( is_uploaded_file( $file_array['tmp_name']) ) {
move_uploaded_file( $file_array['tmp_name'], "$file_dir/$proper_name")
or die ($return_print .= "Couldn't Upload file");
$return_print .= "File Uploaded Successfully.";
}
}print $return_print;
?>