i have a php script and i want it to change the varible in another php file. how would i do this?
editing variables in different scripts
Started by darkson01, Jan 24 2007 12:49 PM
1 reply to this topic
#1
Posted 24 January 2007 - 12:49 PM
#2
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.
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
