tomca55 Posted August 7, 2009 Report Share Posted August 7, 2009 Newbie (to PHP) with a question about object construction. Whenever I call any constructor, php stops rendering the page. Simple example: <?php echo "getting started"; $xmlDoc = new DOMDocument(); //but it could be any class, such as ErrorException, or DateTime echo "but I don't get very far"; ?> I tried using ErrorException to find out what was wrong, but this error doesn't get caught - it appears that PHP parsing ceases with the constructor call! Probably a very simple explanation but bless me if I know what it is! thanks Tom Quote Link to comment Share on other sites More sharing options...
falkencreative Posted August 7, 2009 Report Share Posted August 7, 2009 That code sample works just fine for me... So what happens currently? "getting started" appears in the browser, and then nothing else? Quote Link to comment Share on other sites More sharing options...
tomca55 Posted August 7, 2009 Author Report Share Posted August 7, 2009 Yes, 'getting started' appears - and that's it. there is no closing html or body tag (php is enclosed in html/body tags). As I said it seems to be generic with any constructor call. I think the code itself is simple enough to be benign. probably something to do with the server settings where my site is hosted - I have an email in to our admin, will see. thanks Tom Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.