Can anyone think of a reason why a PHP // comment cancels the execution of a file?
Here's the setup: I have an index.php file that loops through different commands.
if(in_array($act2, $a2))
{
if($act2 == "prods")
{
require('prod.php');
}
else if($act2 == "stats")
{
require('stats.php');
}
else if($act2 == "cust")
{
require('cust.php');
}
}
If a comment ( // style only ) is inside one of these files it will stop the parsing and stop output. I tried to avoid comments but this mysql statement seams to stop it too:
$catrow = mysql_fetch_assoc(mysql_query("SELECT * FROM tea_cats WHERE id='".$row['cat']."'")) or die(mysql_error());
The even stranger part is that it works perfectly fine on my own computer PHP 5.3.0, but not on my server with PHP 5.2.12.
Any answers or replies will be helpful,
Thanks eenceo.