Saya memiliki struktur berikut
otsg
> class
> authentication.php
> database.php
> user.php
> include
> config.inc.php
> encryption.php
> include.php
> session.php
> index.php
> registration.php
file include.php memiliki yang berikut ini
ini_set('display_errors', 1);
error_reporting(E_ALL);
ini_set('include_path',ini_get('include_path').':/Applications/MAMP/htdocs/otsg/:');
require_once 'config.inc.php';
require_once '../class/database.php';
require_once '../class/user.php';
require_once 'encryption.php';
require_once 'session.php';
require_once '../class/authentication.php';
dan di halaman index.php telah saya sertakan
require_once 'include/include.php';
Ketika saya membuka halaman index.php saya mendapatkan peringatan berikut dan kesalahan fatal. Saya tidak mengerti apa yang menyebabkan kesalahan ini. Ketika saya memberikan jalur absolut, itu berhasil. Tapi jalan absolut bukanlah ide yang bagus, saya percaya.
Warning: require_once(../class/database.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/otsg/include/include.php on line 9
Fatal error: require_once() [function.require]: Failed opening required '../class/database.php' (include_path='.:/Applications/MAMP/bin/php5.3/lib/php:/Applications/MAMP/htdocs/otsg/include/:') in /Applications/MAMP/htdocs/otsg/include/include.php on line 9
Terima kasih sebelumnya