Sulman Posted April 2, 2008 Share Posted April 2, 2008 Hi, I have a page that is reliant on many different pages and possibly hundreds of functions. One page or function is outputting a br at the top of the page. But it could be coming from anywhere. What's the best way to find out wich page or function is the naughty one? Thanks Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/ Share on other sites More sharing options...
paul2463 Posted April 2, 2008 Share Posted April 2, 2008 nothing easy is going to find this out for you, you will have to, one at at a time, prevent each page in turn being loaded into your page, one of them will be causing the problem then you find out where on that page the problem is Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507323 Share on other sites More sharing options...
Sulman Posted April 2, 2008 Author Share Posted April 2, 2008 Thanks, I was worried you were going to say that So there isn't anything that will be able to profile my page and tell me what functions are being called and what there output is etc? Thanks Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507362 Share on other sites More sharing options...
uniflare Posted April 2, 2008 Share Posted April 2, 2008 get notepad ++, it has a search feature where you can search through multiple files. ie search all files for <br> or <br /> , or functions like nl2br() etc. Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507365 Share on other sites More sharing options...
Sulman Posted April 2, 2008 Author Share Posted April 2, 2008 I'm using Zend so I can search files and folders but there are hundreds of legitimate br's being echoed in many different files. So I can't really go down that route. Thanks. Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507468 Share on other sites More sharing options...
Sulman Posted April 2, 2008 Author Share Posted April 2, 2008 Found this: debug_print_backtrace() http://uk.php.net/manual/en/function.debug-print-backtrace.php I think it may be what I am looking for. Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507787 Share on other sites More sharing options...
uniflare Posted April 2, 2008 Share Posted April 2, 2008 hmm not sure how . I would use an exit(); call near the start of the script and see if it still shows a <br>. if it did i would move the exit() call up the script, check again if it still output <br> i would repeat until i could narrow down the culprit ------ think would be quicker than following the code line by line, echo by echo hope this helps, Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-507908 Share on other sites More sharing options...
Sulman Posted April 3, 2008 Author Share Posted April 3, 2008 Found it! debug_print_backtrace() didn't work so I took a few of your suggestions and removed line by line. A bit of a pain though! Thanks for your replies. Link to comment https://forums.phpfreaks.com/topic/99159-solved-something-is-causing-a-br/#findComment-508243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.