Can a php page edit itself?

General discussions related to php

Moderators: macek, egami, gesf

Tony121076
New php-forum User
New php-forum User
Posts: 28
Joined: Fri Jan 03, 2003 4:00 pm

Can a php page edit itself?

Postby Tony121076 » Fri Feb 07, 2003 3:18 pm

I have a simple php page that stores and returns a few static variables...

<? #!/usr/local/bin/php
echo "$variable1, $variable2, $variable3";
?>

I need to update those variables from time to time, but I don't want two files to handle this one thing (one to store variables and one to update the storage file). Can I add the update code to the original file? In other words, can a php page open and edit itself?

I know that this would be easy to try, but I'm scared that I might cause problems with the server if this doesn't work.

Thank you for your time and attention.

Tony121076
New php-forum User
New php-forum User
Posts: 28
Joined: Fri Jan 03, 2003 4:00 pm

YES IT CAN

Postby Tony121076 » Fri Feb 07, 2003 4:10 pm

I did it. It works great, if anyone was wondering.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron