Jump to content

Archived

This topic is now archived and is closed to further replies.

DataCom

Variables list

Recommended Posts

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


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Have a look at the [url=http://au.php.net/manual/en/reserved.variables.php#reserved.variables.globals]$GLOBALS[/url] array.

Share this post


Link to post
Share on other sites
[quote]you could explode() between every $ sign and space[/quote]

Why? Every variable within the current script is contained in the $GLOBALS array.

Share this post


Link to post
Share on other sites
[quote]Why? Every variable within the current script is contained in the $GLOBALS array.[/quote]

I am not sure how to do that.

DataCom

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.