echo __FILE__;
gives me: C:\EasyPHP-DevServer-13.1VC9\data\localweb\projects\FOLDERNAME\index.php
I just want to get file name without its path. I want to get index.php on its own.
Any ideas?
echo __FILE__;
gives me: C:\EasyPHP-DevServer-13.1VC9\data\localweb\projects\FOLDERNAME\index.php
I just want to get file name without its path. I want to get index.php on its own.
Any ideas?
Use pathinfo() function, then you can get
filename
viabasename
This will do what you want: