Jump to content


Photo

Variables list


  • Please log in to reply
6 replies to this topic

#1 DataCom

DataCom
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 October 2006 - 12:11 AM

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 http://hijackthis.de...gselect=english If it just created a text file or displayed a list of the variables I could copy. That would work.


Thanks,
DataCom




#2 DataCom

DataCom
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 October 2006 - 12:16 AM

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.

#3 tobydeh

tobydeh
  • New Members
  • Pip
  • Newbie
  • 7 posts
  • LocationLondon -UK

Posted 28 October 2006 - 12:20 AM

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.
There are many ways to skin a cat!

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 28 October 2006 - 01:00 AM

Have a look at the $GLOBALS array.

#5 legohead6

legohead6
  • Members
  • PipPipPip
  • Advanced Member
  • 434 posts

Posted 28 October 2006 - 03:06 AM

you could explode() between every $ sign and space
"Syntax error" .. WHERE THE **** IS IT?!

#6 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 28 October 2006 - 04:30 AM

you could explode() between every $ sign and space


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

#7 DataCom

DataCom
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 October 2006 - 09:51 PM

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


I am not sure how to do that.

DataCom




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users