开发者

running a PHP file in background

I'm building an upload files form, it works fine but now i wanna add some extra features to it, for example, When I upload the file the page im in sends m开发者_运维百科e to the PHP page, then it echo's a message saying that its done and showing a preview of the image.

What I would like to do now is to stay in the same page as the file is being uploaded, then just get a message in the same page once the file is done uploading. So in other words not be sent to the PHP page instead that info (sent via form POST) can be sent in the background (maybe using XMLHttpRequest?)

Can somebody point me to the right direction to do something like that? i would greatly appreciate it.

Thanks!


You'll have to use javascript and APC_UPLOAD_PROGRESS to monitor the upload. Like this: http://www.ibm.com/developerworks/library/os-php-v525/index.html

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜