Results 1 to 25 of 100
Nov 11, 2003, 10:13 #13
Originally Posted by Selkirk
- Join Date
- Nov 2000
- 0 Post(s)
- 0 Thread(s)
For a page controller which hasn't actually been deployed yet, this might happen;
1. User requests http://www.example.com/example_page.php
2. Apache finds page doesn't exist, calls 404 hander deployer.php
3. deployer.php copies /home/username/deploy/example_page.php to /home/username/www/example_page.php (adding necessary mods for front controller)
4. Page is served
5. User requests http://www.example.com/example_page.php again.
6. example_page.php (or some included code) checks the modification time on /home/username/deploy/example_page.php and compares with itself - updates if needed.
8. Latest version is executed
9. Page is served
Something like that. For users unable to modify their server's 404 handler, the initial deployment would need to be manually invoked but after that, no problem.
Whether this is a good idea though, not sure. Some things that might be problematic;
Confusing to develop with - you place your script in a different directory to the one it will actually be executed from - might make includes etc. mind boggling.
Easy to break(?). A script which "updates itself" may not be a pretty thing.