I want to execute this script and use the file it is located on as the "a.php".
I have tried for a few hours to do this.
$str = file_get_contents("a.php")
I need it to get something like this.
$str = file_get_contents("$self")
I am guessing.
Get the contents of it's own self.
It need just run the code on it's self regardless of what the name of it's self is.
Right now it gets the info from "a.php" and creates a copy of "a.php" with a variable name.
I just nees it to get it's self and create a copy of it's self.
Apologies For repeating myself. I just wanted to be clear.
Regards and Thank you....
$str = file_get_contents("a.php");
preg_match('%<meta name=\"keywords\" content=\"([^"]*)"%i',$str,$matchArray);
$namesArray = explode(",",$matchArray);
$file = fopen($namesArray.$namesArray.$namesArray.".txt","w+");