Try downloading the .zip file using the ftp_put function, but it cannot load a large file (more than 1 MB)

I use the following code to upload a file .zip, but I cannot upload a file larger than 1 MB:

$upload = ftp_put($conn_id, $target_path.'/'.$filename, $source, FTP_BINARY);

Any thoughts?

+5
source share
3 answers

You changed the configuration settings on php.ini max_file_uploads to a latger value, the values ​​are taken as MB, so give something more than 5

I am sure it should work.

+1
source
  • Changing php.ini will launch the php application.

  • Modifying the htaccess file will lead to the project

  • A change in the php file will lead to the creation of the php file and its included files

Choosing which one is based on your recommendations.

upload_max_filesize, .

post_max_size - , .

, , ... .. .

upload_max_filesize, post_max_size ...

+1

You checked error_log. If you do not check this and find out what the problem is, and if you use apache, you can set the php.ini setting in .htaccess. Like this

php_value  upload_max_filesize  20M

Paste this .htaccess file and you can download the file. Also, check error_log what exactly causes the problem.

+1
source

All Articles