Forum Moderators: coopster
The question I have is this:
I have a script called aa.php, bb.php, cc.php so on...
The content I am storing in files called aa-detail.php, bb-detail.php, cc-detail.php so on ...
I there a way of getting the current file name and then adding "-detail" in between the file prefix and file suffix.
If this is possible then I could make the calling of the detail script dynamic rather than hard coding.
Thank you.
$pagename = str_replace('.','-detail.', basename [php.net]($_SERVER['PHP_SELF']));2 lines less ;) ... hehe
for example.
gallery.php calls my script aa.php, when I echo the current file name inside aa.php it returns gallery.php I need it to retuen aa.php so that I can append aa-detail.php.
Thank you.