Yesterday I was wondering about the possibility to use, in PHP, a file's name as argument for the file itself... Basically, I've a file named "file.php", and whenever, through the browser, I request any file i.e. "test1.php", I call the file "file.php" passing as argument the name of the previous file. Is possible to do something like this?
<Files *.php>
//I call the "anotherpath/file.php" file passing as argument the filename of the file called before
//i.e. Call anotherpath/file.php?arg=filename of the "virtual" file
</Files>
"test1.php" (which isn't even in the server) calls "anotherpath/file.php", and this one can access the "test1" string. Thanks in advance!
?q=anythat takes you tofile.phpand add a rewrite rule in.htaccess. I wouldn't keep the.phpextension tho.$_SERVER['REQUEST_URI']?