Tree:
--myproject
----mailer
-------class.phpmailer.php
----test
-------index.php
----site.php
----class.php
----db.php
----index.php
index.php: (both)
<?php
require_once '../site.php';
?>
site.php:
<?php
require_once "class.php";
?>
class.php
<?php
require_once 'db.php';
require_once('./mailer/class.phpmailer.php');
?>
When I visit test it shows:
Warning: require_once(./mailer/class.phpmailer.php): failed to open stream: No such file or directory in C:\wamp\www\myproject\class.php on line 3
Fatal error: require_once(): Failed opening required './mailer/class.phpmailer.php' (include_path='.;C:\php\pear') in C:\wamp\www\myproject\class.php on line 3
I also tried include_once
but same error!
require_once '../site.php';
if both site.php and index.php are in the same directory? – Rehmat