Mantis - Quercus
Viewing Issue Advanced Details
3724 major always 10-21-09 00:59 10-29-09 15:58
mastergaurav  
 
normal  
new 3.1.9  
open  
none    
none  
0003724: include_once return value does not match specs
Hi,

I just downloaded resin-3.1.9 and tried to run a simple include_once code (given in additional information).

As per PHP website (www.php.net), the return value of include_once must be true if the inclusion was successful.

I always get a return value as probably an empty string. Whatever be the value, it evaluates to "false"!
-------------------- main file -----------------------
<?php
    header('Content-Type: text/plain');

    echo "Hello World\n";
    echo 'Folder: '.dirname(__FILE__)."\n";

    $x = include_once(dirname(__FILE__)."/hw2.php");
    echo "Value of x: ".$x." => ".($x ? "Yes" : "No")."\n";

    $x = include_once(dirname(__FILE__)."/hw2.php");
    echo "Value of x: ".$x." => ".($x ? "Yes" : "No")."\n";
?>
-------------------- main file -----------------------


-------------------- included file (hw2.txt) ----------------
<?php
    echo "Hello 2\n";
?>-------------------- included file (hw2.txt) ----------------

There are no notes attached to this issue.