ajax - jquery - PHP methods response -


i have in php methods executing in "main method", i.e.:

    public function main()     {        $this->methodone();        $this->methodtwo();        // etc.         // returns status code (can json)     } 

now want "progress" in front-end, i.e.
main method started...

starting methodone...
methodone completed!

starting methodtwo...
methodtwo completed!

etc.

how can this? don't need "real progress" in point/percents, etc. status - completed or not.

add echo calls @ end of methods if commplete.

that log progression of process goes on screen.

if process quite complex, can dedicate private method it, pass name of running method , contextual data, , method builds , prints information need have.

if want synchronous logging of php process's progression, ar ein world of trouble. isn't impossible, several orders of magnitude harder pull off.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -