spiderwell Posted June 15, 2011 Share Posted June 15, 2011 i run wamp on my laptop, and have just started an attempt at an MVC styled website, and had got myself to a point were I was ready to run a test page with a simple view page showing my $_GET array just to test it all worked. I was for the first time using buffering like this, which was in a class called via the page: <?php ob_start(); require_once('../ph-admin/views/sample.php'); $txtDisplay = ob_get_contents(); ob_end_clean(); ?> I then echoed $txtDisplay in the page to show the final out put of sample.php. all it would do though was show the actual php code in sample and in the main page. 3 days of endless jigging around and hairpulling I finally worked out it was because those 2 bits of scripts had short tags and my dev environment had them turned off!! sad but true!! lols I was convinced it was to do with the buffering since I was my first attempt at trying that, and didn't even think to check short tags!! Anyone else want to confess to something stupid like this? Quote Link to comment https://forums.phpfreaks.com/topic/239463-spending-too-long-on-a-php-issue-that-was-infact-something-very-simple/ Share on other sites More sharing options...
Philip Posted June 15, 2011 Share Posted June 15, 2011 If I don't make a stupid mistake I can't find within a minute... I call it a good day for me. Quote Link to comment https://forums.phpfreaks.com/topic/239463-spending-too-long-on-a-php-issue-that-was-infact-something-very-simple/#findComment-1230177 Share on other sites More sharing options...
PFMaBiSmAd Posted June 15, 2011 Share Posted June 15, 2011 [ot]magic_quotes short open tags (and all the other things php put into the language to HELP people write 'working' code) has wasted a HUGE amount of man hours and processor cycles.[/ot] Doesn't the offtopic/ot bbcode tag exist/work anymore? Quote Link to comment https://forums.phpfreaks.com/topic/239463-spending-too-long-on-a-php-issue-that-was-infact-something-very-simple/#findComment-1230183 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.