如何使PHP包含当前页面名称?

I'm currently hardcoding an include into my pages and its a lot of work everytime I want to create a new page. Currently, my url is like this:

http://example.com/folder/one-z-pagename.php?var1=one&var2=two

and in one-z-pagename.php I have an include that looks like this:

include("lander-a-pagename.php");

So what I want to do is instead of hardcoding the file into the page like above, I want to grab one-z-pagename.php without the ?var1=one&var2=two from the url, erase the first 6 characters which is one-z- and replace it with lander-a-.

How do I do something like this?

use parse_url and basename to get filename then str_replace

$url= parse_url('http://example.com/folder/one-z-pagename.php?var1=one&var2=two');
$file = basename($url['path']);
$newfile = str_replace('one-z-','lander-a-',$file);
echo $newfile;

output : lander-a-pagename.php

It can be achive by many method, have a look on below two methods:

Method 1:

$current_script_name = basename(__FILE__);
$include_script_name = 'lander-a-'.substr($current_script_name, 6);

Method 2:

$current_script_name = $_SERVER['SCRIPT_NAME'];
$current_script_name = end(explode('/', $current_script_name));
$include_script_name = 'lander-a-'.substr($current_script_name, 6);
//OR
$include_script_name = str_replace('one-z', 'lander-a', $current_script_name);

variable $include_script_name contains required filename which you want to include.

Hope this will help.