douyi3767 2011-08-17 14:22 采纳率: 0%
浏览 18
已采纳

在前端使用ajax编写php服务器端代码进行图像处理。 PHP

I have some script that takes a form and sends it to php using jquery ajaxSubmit.

Server side must copy image from one location to another. using this code copy($img_dir_file,$mini_dir_file); is ok if u have few images.

But if u have let's say 20+ images php works slowly, and responds to ajax before finishing it's job. Thus Ajax changes content to blank page , cause result is not ready.

If you refresh page a bit later, everything is ok cause php finishes his work.

So please tell me what should I do with this problem ?

script is something like this

$('#save_edited_article').live('click',function(){
$('#edited_article_form').ajaxSubmit({
success: function(responseimage){
$('#main_content').html(responseimage) } }); });
  • 写回答

3条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 如何用LaTeX打出如下的表格
      • ¥15 程序填空补充完整的代码一共三题
      • ¥15 在MySQL中使用while建表,报错
      • ¥15 DB2线上告警,三表联查sql优化。
      • ¥15 python导入pyautogui报错,网上也没有找到解决方法如何解决?
      • ¥15 关于IPSEC和NAT SERVER同时使用的情况下,该如何解决客户端访问服务器的问题
      • ¥15 eclipse项目在idea运行部署到云服务器
      • ¥100 sql server image类型转换
      • ¥15 关于matlab的问题
      • ¥15 数据结构二叉树——统计二叉树的结点、深度、叶子结点个数