jonsmth948 Posted January 25, 2013 Share Posted January 25, 2013 Is there a software or way to know which PHP page was ran. For exaple index.php has a function called balls() but was included for another php page which was included from another. I want to be able to run index.php and know what other pages were ran as well. Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/ Share on other sites More sharing options...
requinix Posted January 25, 2013 Share Posted January 25, 2013 PHPFreaks.com Questions, Comments, & SuggestionsThis is NOT a help forum! Do not post topics asking for help not related to the website. get_included_files and debug_backtrace are close. Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408254 Share on other sites More sharing options...
gizmola Posted January 25, 2013 Share Posted January 25, 2013 Is there a software or way to know which PHP page was ran. For exaple index.php has a function called balls() but was included for another php page which was included from another. I want to be able to run index.php and know what other pages were ran as well. Just to correct your terminology, php has page scope. So only one script runs at a time. The fact that you have other php files which contain code and are included does not make them seperate "runs". With that said there are ways you can build in a tracing facility, using some of the functions requinix indicated, although you can also setup xdebug and profile execution. What is it about specific files that are important? You could include a file that has code that is never executed, or have a script with 100 functions in it, only 2 of which get called. What is it that you are actually trying to determine with this effort and why? Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408258 Share on other sites More sharing options...
jonsmth948 Posted January 25, 2013 Author Share Posted January 25, 2013 I'm trying to determine what function was ran and where is it coming from Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408264 Share on other sites More sharing options...
trq Posted January 25, 2013 Share Posted January 25, 2013 I'm trying to determine what function was ran and where is it coming from Have you looked at the functions suggested then? Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408279 Share on other sites More sharing options...
jonsmth948 Posted January 26, 2013 Author Share Posted January 26, 2013 yes I tried to above functions and it did what I was looking for. Also what is a good help related PHP forum. Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408339 Share on other sites More sharing options...
trq Posted January 26, 2013 Share Posted January 26, 2013 Also what is a good help related PHP forum. You are kidding right? Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408340 Share on other sites More sharing options...
requinix Posted January 26, 2013 Share Posted January 26, 2013 Read the description very carefully. This is NOT a help forum! Do not post topics asking for help not related to the website. "This" was the PHPFreaks.com Questions, Comments, & Suggestions forum where you originally posted your thread. You were not asking a question, adding a comment, or making a suggestion about phpfreaks.com. You posted a topic asking for help not related to the website. So now your thread is here in PHP Coding Help, where people ask for help coding in PHP. Quote Link to comment https://forums.phpfreaks.com/topic/273644-what-php-page-was-ran/#findComment-1408345 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.