How to make slim show that no Defined variables, no indexes, only an error is reported without exiting the program

Source: Internet
Author: User
There is a large php program left over in history, which is extremely nonstandard. Many variables are defined only in a segment of the if statement, but will be used later; there are also many cases where the index value may not be specified and the index value is used directly to determine whether the index exists first. Of course, the best thing is... there is a large php program left over in history, which is extremely nonstandard. Many variables are defined only in a segment of the if statement, but will be used later; there are also many cases where the index value may not be specified and the index value is used directly to determine whether the index exists first.

Of course, the best thing is to fix these irregularities, but the workload is too large.

Note:If the program runs well, the log reports an error when the above problem occurs again.

But now you need to plug-in a slim framework and add restful interfaces to the source program. The problem arises. When any of the above errors occur, slim will exit the program.

Is there anything?Set or ParameterWhen the class/function that allows access to the slim interface to execute the source program, the above possible errors will be the same as those of the source program.Write error logs without force exit.

Reply content:

There is a large php program left over in history, which is extremely nonstandard. Many variables are defined only in a segment of the if statement, but will be used later; there are also many cases where the index value may not be specified and the index value is used directly to determine whether the index exists first.

Of course, the best thing is to fix these irregularities, but the workload is too large.

Note:If the program runs well, the log reports an error when the above problem occurs again.

But now you need to plug-in a slim framework and add restful interfaces to the source program. The problem arises. When any of the above errors occur, slim will exit the program.

Is there anything?Set or ParameterWhen the class/function that allows access to the slim interface to execute the source program, the above possible errors will be the same as those of the source program.Write error logs without force exit.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.