php如何从另一个文件夹中包含文件

I want include file from another folder. i used different ways but nothing helped me out. One folder back solution and two folders back none gave me any positive respone.

I always getting this error

This is the tree of the folders

<?php
   include_once('./../models/config.php');
?>

The folder where the file is, and the file master.php are in the same folder :

<?php include_once('models/config.php'); ?>

How about this:

require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'config.php'

Your models directory is in same path as master.php. I recommend always using absolute paths for this kind of things.

Include following lines of code in your file

<?php require_once('../models/config.php'); ?>