Php minor issues ignore_user_abort (); set_time_limit (0); $ interval & nbsp; = 1; do {& nbsp; phpcode; & nbsp; if {& nbsp; & n small php issue
Ignore_user_abort ();
Set_time_limit (0 );
$ Interval = 1;
Do {
Phpcode;
If {
}
Else {
Phpcode;
}
Sleep ($ interval );
} While (true );
The phpcode here is the same piece of code. But I don't want to write so much code. Complex.
Is there a way to make phpcode call again.
At present, I think using function bar phpcode to write a function and then call it multiple times.
Are there other methods ???
The second problem is the phpcode section.
Here, my phpcode function is to write files in the created directory.
For example, in the folder 1/write 1-20..html
But in the write process. If a problem occurs, the directory is stuck. for example, the result of deleting the directory 1 during the generation process is stuck. Ball solution
------ Solution --------------------
Question 1 ....
Write a function decisively
PS: do you want to execute do while for the first time?
Can I use while directly?
------ Solution --------------------
It is better to write a function in phpcode. if the function is stuck, you need to optimize the function and use the cache to write files.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service