Upload large files to FTP with PHP

前端 未结 2 1609
孤独总比滥情好
孤独总比滥情好 2021-01-22 05:53

I\'m trying to upload large files with php to an ftp server. I can upload small files, but I\'m having trouble uploading larger files. I have looked it up and found that I nee

2条回答
  •  终归单人心
    2021-01-22 06:34

    From this site: http://www.php.net/manual/en/ini.php

    'upload_max_filesize' and 'post_max_size'

    are of type PHP_INI_PERDIR

    which means Entry can be set in "php.ini, .htaccess or httpd.conf". So you can't set it in your script.

    --- Edit ---

    A similar question: Changing upload_max_filesize on PHP

    --- Edit 2 ---

    Personally, I wanted to do the same kind of stuff (upload large files over ftp) and end up writing a java application. For handling large files, php is not really the best way. Web browsers doesn't really like that. So, for handling large files, I would suggest to look at other alternative: (java, swf, javascript, ...)

    Something I would like to give a try when I have some time is http://nodejs.org/

提交回复
热议问题