permalink page name and using php_self
2 posts by 1 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 6, 2017 (RSS)
By Twocans - June 6, 2017 - edited: June 7, 2017
Hello,
I am using permalink on a page, aka my page is really called mypage.php?id=1234565 but shows ep/mypage.php aka it is in a dir.
Now when I have php_self on my page
<?php
echo $_SERVER['PHP_SELF'];
?>
I end up with ep/mypage.php,how can I have it show just the mypage.php
if anyone has input I am grateful
cheers
Kenny
By Twocans - June 6, 2017
never mind lol I was so tired I made mistakes
<?php echo basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']); ?>
this works
aka, instead of giving me /mydir/mypage.php
it gives me
mypage.php
cheers
k