Jump to content


editing variables in different scripts


1 reply to this topic

#1 darkson01

    Young Padawan

  • Members
  • Pip
  • 114 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Gfx, skateboarding, playing guitar, listening to punk music and flash!

Posted 24 January 2007 - 12:49 PM

i have a php script and i want it to change the varible in another php file. how would i do this?

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 24 January 2007 - 03:33 PM

Tricky, tricky...

Well, there would be many methods of doing this. Easiest would be to have these variables being pulled from a file/database (database being more secure of course), and have your modifying file simply update that file/database. Otherwise, you would have to make the script use regex and try to find that part and edit the file as if it were plain text (wouldn't recommend it since you could end up doing damage to the rest of the file if you don't know what you're doing). Or, you could somehow make it so the file ends up being included and pulls the variable from the parent file.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users