I am having some serious troubles uploading files to my server.  The ISP
cannot provide me with the tmp directory where files are stored so I am
trying to change that directory to a specified one.  I am editing the
php.ini file to read as follows:

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if
not
; specified).
upload_tmp_dir = ./var/www/html/tmp/

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

alas, when i upload  a file, nothing arrives in the specified folder.  All
permissions are set to full access.

below is the php code:

<HTML>
<HEAD>
<TITLE>Handling File Uploads</TITLE>
</HEAD>
<BODY>
<?php
/* This next conditional determines whether or not to handle the form,
depending upon whether or not $File exists. */
if ($File) {
  print ("File name: $File_name<P>\n");
  print ("File size: $File_size<P>\n");
  if (copy ($File, "users/$File_name")) {
   print ("Your file was successfully uploaded!<P>\n");
  } else {
   print ("Your file could not be copied.<P>\n");
  }
  unlink ($File);
}

print ("Upload a file to the server:\n");
print ("<FORM ACTION=\"FileUpload.php\" METHOD=POST
ENCTYPE=\"multipart/form-data\">\n");
print ("File <INPUT TYPE=FILE NAME=\"File\" SIZE=20><BR>\n");
print ("<INPUT TYPE=SUBMIT NAME=\"SUBMIT\" VALUE=\"Submit!\"></FORM>\n");
?>
</BODY>
</HTML>


any help would be immensely appreciated

Thanks in advance

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to