Jump to content

[SOLVED] how to use dirname(_file_)?


sayedsohail

Recommended Posts

Hi,

 

I just wish to include two directories in my config.php file so when the user type a.php it will be served from directory a and if the user type b.php it will be served from directory b which is a subdirectory of directory a.

 

require_once( dirname( __FILE__ ) .  );

 

Can someone advise how to do this?

 

Link to comment
https://forums.phpfreaks.com/topic/69474-solved-how-to-use-dirname_file_/
Share on other sites

thanks for that,

 

i am trying to achieve somthing like this

 

from my url if i type localhost/a/a.php it will dsiplay a.php, now i wish to call b.php using the same url address i.e, localhost/a/b.php instead of localhost/a/b/b.php, since b.php is stored under the subdirectory of directory (a).

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.