Mantis - Quercus
Viewing Issue Advanced Details
2794 minor always 07-17-08 15:31 07-17-08 17:09
ferg  
nam  
normal  
closed 3.1.6  
no change required  
none    
none 3.1.6  
0002794: include() or die
(rep by tonystark)

I'd like to share the recent problem with Resin and PHP which I have.

I created very simple php file:

<?php
$file = '/opt/resinpro/webapps/dim/class.php';
include($file) or die();
?>

The error which I get is:

"/opt/resinpro/webapps/dim/index.php:2: Warning: '1' is not a valid path"

Does anybody have an idea why include() / require() don't work properly in this case on 3.1.6? Thanks in advance!

Notes
(0003277)
nam   
07-17-08 17:09   
The current behavior is correct because "include()" is not a function call but is a special language construct.

The include parentheses are not required, which means that:

  include($file) or die()

is equivalent to:

  include $file or die()