|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
A few questions:
(1) For privacy, while testing my web pages, how can I access a page so that it loads fine on my PC - but to anybody else who tries to view it they get some sort of error or message? i.e. what does my PHP code need to do in order to allow it to just work when I view it in my browser? (I know I can develop a site locally on my PC, but that is NOT what I want to do here - I wish to load the pages off my host's server - just as regular visitors would do.) (2) I would like to continue development on my site, while a version of that site is also live. I want my site to be running 24/7, and don't want to shut it down to add updates or do maintenance. How do sites like Amazon.com, CNN.com etc. handle this sort of thing - does anybody have any advice on working with such a system - how is the switch over to updated code and database made? Can anybody point me to any articles, resources etc? (3) Anything else I should consider when developing a site that is simultaneously live - any other tips? Thanks in advance, Simon. |
|
#2
|
||||
|
||||
|
(1) simple, add an if statement around your code, like this:
PHP Code:
(2) At my work we do this by running a testserver that's a complete copy of the live server, on which all dev work is done. Then when a new section is done, it's either copied to the live server (if it's one or two files), or when it's a large scale overhaul, the web server config is altered so the test server is now the live server. (Both servers run off the same machine as virtual servers). At home I do the same, I run a webserver off my own machine, which is a complete mirror of my real website which is hosted elsewhere. I change things locally, then when I'm finished, I upload the entire bunch to the other server. (3)If you use any of the aforementioned tips, make sure all your links, paths etc are relative, not absolute. Also make sure you make your code as generic as possible, so don't use non-standard stuff like register_globals and stuff, as your code will crash hidiously when copied to a non-compatible webserver. As for working on a real, live server, I really won't recommend that, unless a few parse errors shown to your visitors don't matter. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Working on site while it is simultaneously live? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|