简体   繁体   English

图片上传速度太慢php

[英]image uploading too slow php

i am doing multiple image upload with php using ajax . 我正在使用ajax用php上传多个图像。 i am submitting the image upload form with file inputs targetted to a hidden iframe . 我要提交的图像上传表单具有针对隐藏iframe的文件输入。 after that i do 'move_uploaded_file()' and then i am compressing the uploaded file to a smaller size. 之后,我会执行“ move_uploaded_file()”,然后将上传的文件压缩为较小的大小。 then i display the uloaded file names in iframe and retrieve them in jquery to check whether all were uploaded. 然后我在iframe中显示上传的文件名,并在jquery中检索它们,以检查是否所有文件都已上传。 after all these processes i am doing database actions and building some html content and display them . 在完成所有这些过程之后,我正在执行数据库操作并构建一些html内容并显示它们。 this really takes plenty of time while running in my machine itself . 在我的机器上运行时,这确实需要很多时间。 i felt it will surely take too much time when it is live. 我觉得直播肯定会花费太多时间。 please suggest me some way to shorten this lengthy time and correct me if i am wrong in this process. 如果我在此过程中做错了,请建议我一些方法来缩短这个漫长的时间并纠正我。 i understood that compression takes much time . 我知道压缩需要很多时间。 but i have to compress it and i have no other go . 但是我必须压缩它,我没有其他选择。

另外,如果您想要多个异步ajax请求,则应查看http://konrness.com/php5/how-to-prevent-blocking-php-requests/的思想,在使用session_start()时要多加注意;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM