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 Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/ 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. Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-115654 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. Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-115657 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. Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-115664 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 Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-115683 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. Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-115712 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 Link to comment https://forums.phpfreaks.com/topic/25366-variables-list/#findComment-116059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.