To go one level up on dirname(__FILE__)

 

For PHP < 5.3 use:

$upOne = realpath(dirname(__FILE__) . ‘/..’);

Or in PHP 5.3+ use:

$upOne = realpath(__DIR__ . ‘/..’);

Advertisements

One thought on “To go one level up on dirname(__FILE__)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s