Hi Richard,

Thanks a lot!
So  can  I  let  them  upload, say, a 700 Mb file via POST or should I
consider connecting to FTP?

With best regards from Ukraine,
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: ad...@buskirkgraphics.com <ad...@buskirkgraphics.com>
To: 'Andre Polykanine'
Date created: , 3:41:59 PM
Subject: [PHP] Ftp upload

      Andre, I have checked the $_POST, and THE $_FILES.
I am pretty sure the actual path is not passed. Now you can find the path on 
the server in the tmp_name of the $_FILES array.

I have read a few DOM related issue concerning the PATH of the file uploaded in 

Microsoft: Internet Explorer 7 and later. By default, Internet Explorer does 
not include folder or directory path information when uploading files to sites.

So this means the "Clients Browser" is passing the file name NOT the path.

I am sure if you dig around in JavaScript you may find a way to see the value 
of that attribute on submit or click.
I have never wanted to know the actual file path from the end user, nor has it 
ever been a request for me to do so.

You can however change the ini for upload_max_filesize and post_max_size inside 
of your php script at the top.

<title>A file upload script</title>
ini_set('upload_max_filesize', 8000000);
ini_set("post_max_size", "30M");

$file_dir = ".";
$file_url = ".";
if ( isset( $fupload ) ){
   print "path: $fupload<br>\n";
   print "name: $fupload_name<br>\n";
   print "size: $fupload_size bytes<br>\n";
    print "type: $fupload_type<p>\n\n";
   if ( $fupload_type == "image/gif" ){
     copy ( $fupload, "$file_dir/$fupload_name") or die ("Couldn't copy");
     print "<img src=\"$file_url/$fupload_name\"><p>\n\n";
<form enctype="multipart/form-data" action="<?php print $PHP_SELF?>" 
    <input type="hidden" name="MAX_FILE_SIZE" value="51200">
    <input type="file" name="fupload">
    <input type="submit" value="Send file!">

Richard L. Buskirk

-----Original Message-----
From: Andre Polykanine [mailto:an...@oire.org] 
Sent: Tuesday, June 14, 2011 7:38 AM
To: Php General
Subject: [PHP] Ftp upload

Hi everyone,
I would like to have a possibility to upload really large files to the
As we all know, the post_max_size parameter is set to 8Mb by default.
However,  I  see  that  the  ftp_put() function has a "local filepath"
And  the  question is: how can I retrieve the local filepath if a user
browses to the file from his/her PC?


With best regards from Ukraine,
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

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

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

Reply via email to