如何将图像保存在文件夹中后立即收到通知


How to get notification immediately after saving the image in folder?

我正在做一个应用程序,当图像保存到服务器中的文件夹中时,必须收到通知(本地)。收到通知后是否可以开始运行脚本?谁能帮我?

提前谢谢。

if(move_uploaded_file($temporary, $upload_location)) 
{
   echo "<span style='font-size:0px'>image_saved</span>";
}

如果你使用的是jQuery,那么你可以从PHP获取响应并将其显示在你的应用程序上。

if(indexOf('image_saved') != -1){
    $('#messageDisplayer').html("The image has been saved successfully");
}
else{
    //do something
}