hmvrulz Posted September 27, 2008 Share Posted September 27, 2008 $filename = basename(__FILE__, ".php"); am using tht in file2.php but file1.php includes file2.php so how can i get the file name of file1.php using basename() but being included in file2.php file1.php - main files executed files2.php - has this variable Quote Link to comment Share on other sites More sharing options...
papaface Posted September 27, 2008 Share Posted September 27, 2008 $filename = basename($_SERVER['SCRIPT_NAME'], ".php"); Quote Link to comment Share on other sites More sharing options...
hmvrulz Posted September 27, 2008 Author Share Posted September 27, 2008 $filename = basename($_SERVER['SCRIPT_NAME'], ".php"); tahnx mate... any idea how to include the full path of the server into it... should i concantinate it with the prev server path Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.