DataCom Posted October 28, 2006 Share Posted October 28, 2006 Hi,I am getting ready to modify a site I had developed and now understand php enough to modify it myself. I am looking for a way to get all the variables in the code without going through it page by page. I was thinking maybe a php script would work to create a text list of variables from a php file pasted into it using a box on a simular type page such as a server side php editor. or a page simular to hijackthis [url=http://hijackthis.de/index.php?langselect=english]http://hijackthis.de/index.php?langselect=english[/url] If it just created a text file or displayed a list of the variables I could copy. That would work.Thanks,DataCom Quote Link to comment Share on other sites More sharing options...
DataCom Posted October 28, 2006 Author Share Posted October 28, 2006 I am not posting for work nor asking for a script to be created. I am asking if anybody is aware of a script that does this. Quote Link to comment Share on other sites More sharing options...
tobydeh Posted October 28, 2006 Share Posted October 28, 2006 I have never seen anything to do this. You could write a function to read through a DIR, loops through all the files and read them into strings then check for varibales.. but that is a bit of a mission. Quote Link to comment Share on other sites More sharing options...
trq Posted October 28, 2006 Share Posted October 28, 2006 Have a look at the [url=http://au.php.net/manual/en/reserved.variables.php#reserved.variables.globals]$GLOBALS[/url] array. Quote Link to comment Share on other sites More sharing options...
legohead6 Posted October 28, 2006 Share Posted October 28, 2006 you could explode() between every $ sign and space Quote Link to comment Share on other sites More sharing options...
trq Posted October 28, 2006 Share Posted October 28, 2006 [quote]you could explode() between every $ sign and space[/quote]Why? Every variable within the current script is contained in the $GLOBALS array. Quote Link to comment Share on other sites More sharing options...
DataCom Posted October 28, 2006 Author Share Posted October 28, 2006 [quote]Why? Every variable within the current script is contained in the $GLOBALS array.[/quote]I am not sure how to do that.DataCom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.