chrismfz Posted April 21, 2010 Share Posted April 21, 2010 Can anyone else confirm this please ? When I am writing a script or a module like this one for example: <?php function testmod() { include("path/dbconnect.php"); include("path/includes/functions.php"); $query = "SELECT * from tbldomains WHERE registrar = 'directi' "; $result=mysql_query($query); echo $result; } testmod(); ?> When I execute it I get this php test.php <div style="border: 1px dashed #cc0000;font-family:Tahoma;background-color:#FBEEEB;width:100%;padding:10px;color:#cc0000;"><strong>Down for Maintenance</strong><br>An upgrade is currently in progress... Please come back soon...</div> It only works if the includes are in the top of the script like this one: <?php include("path/dbconnect.php"); include("path/includes/functions.php"); function testmod() { $query = "SELECT * from tbldomains WHERE registrar = 'directi' "; $result=mysql_query($query); echo $result; } testmod(); ?> And I get results. When writing a module it's not big deal but in scripts, or inside another site integration like Joomla I get the Down for Maintenance error because of this weird include() behaviour. I only noticed this on 4.2.1. Tested in previous version it works just fine wherever includes() are... 0 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.