'stop php script during ajax

i want stop my script during my call ajax:

include "co.php";

include "infopagetransfert1.php";

include "senddatatransfert1.php";

?>

<script> 
     var content = $("body").html();
               $.post("infopagetransfert2.php", {
                  content: content,
               }).done(function (data) {
               });
</script>


<?php
sleep(10);
   $myfile = fopen("example_homepage2.txt", "r") or die("Unable to open file!");
   $test = fread($myfile, filesize("example_homepage2.txt"));


on my ajax i create the example_homepage2.txt, so i want stop the script during ajax and after do behind sleep 10

Thank guys



Solution 1:[1]

You can not. You can read PHP response data from ".done()" function and do the rest thing.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 xforce