This php script I’m working on has a million includes and I’m trying to find where the constant TEXT_PRODUCT has been defined (what filename and line number) is this possbile?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you want to check for one time where it gets defined, define TEXT_PRODUCT at start of your script as. So whenever PHP script tries to define it again in any file it will give notice level error that it is defined previously.
But you have to define your own error handler to get exact line number and file
So whenever, we again define same variable in any file, it will display notice level error on screen and you can get file name as well as line no. using this.