Note that there are some explanatory texts on larger screens.

plurals
  1. POrequire_once and include_once not resolving files correctly
    primarykey
    data
    text
    <p>Am having problems with PHP's require_once, require, include_once and include functions not correctly resolving a file. I am running PHP 5.3.1 on Windows Vista with Apache 2.2.11.</p> <p>These are the problems I am getting:</p> <pre><code>file_exists('C:/wamp/www/park_factor_network/system/application/shared/config/language.php') </code></pre> <p>returns TRUE</p> <pre><code>is_readable('system/application/shared/config/language.php') </code></pre> <p>returns TRUE</p> <pre><code>$fp = fopen('C:/wamp/www/park_factor_network/system/application/shared/config/language.php','r'); $contents = fread($fp, filesize('C:/wamp/www/park_factor_network/system/application/shared/config/language.php')); </code></pre> <p>returns a valid file resource and stores it into $contents</p> <p>However:</p> <pre><code>require_once('system/application/shared/config/database.php') or die("Cannot Include Language Config"); require_once('C:/wamp/www/park_factor_network/system/application/shared/config/language.php') or die("Cannot Include Language Config"); </code></pre> <p>return:</p> <pre><code>Fatal error: require_once() [function.require]: Failed opening required '1' (include_path='.;C:\php5\pear') in C:\wamp\www\park_factor_network\system\application\shared\hooks\select_language.php on line 25 </code></pre> <p>C:\wamp\www\park_factor_network\system\application\news_site\hooks is a Directory Junction for C:\wamp\www\park_factor_network\system\application\shared\hooks</p> <p>I only experience this problem when accessing this file from a certain location in the framework, however as this is a direct include or require it shouldn't be affected by that and only PHP? If I try and include the file anywhere else within my setup it loads fine.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload