|
Posted by Phil Nospam on 10/13/05 11:30
"J.O. Aho" <user@example.net> wrote in message
news:3sfe4kFnto1oU1@individual.net...
> Phil Nospam wrote:
>
>
> > 2) If my databases will have some fields containing URLs to pages on my
site
> > and other URLs to other web sites, what kind of problems will I face
when I
> > try to update the production DB with what I've developed on the
development
> > DB?
>
> Don't use hard coded URLs, you let the php script to "ask" the web server
what
> ip-name it uses and then just hard code the path.
>
> $mainpage=$_SERVER['SERVER_NAME']."/index.php";
>
>
> //Aho
Thanks Aho.
I thought that having it at home would be better but was concerned about
errors that would occur after uploading when the paths/server names might
not match up exactly. Your explanation above is most helpful. As you might
be able to tell, I'm not a DBA and have never taken any courses (not even
for the Brio/Oracle stuff I did). I just tend to be thrust into things at
work because they see I have good general computer knowledge and can learn
new skills/concepts very quickly.
One more thing about your response above. Let's assume that I register the
domain www.mywebsite.com. Would that line look like this:
$mainpage=$_SERVER['www.mywebsite.com']."/index.php";
I'm picking up a used PC on Monday from a state government surplus warehouse
to use as my development PC/Server at home. 900MHz Pentium3 with 512MB
RAM, 40GB HD, CD burner, ZIP drive, two NICs, dual VGA output video card,
and I think there was an internal tape backup - very sweet for $50. As much
as possible I'm going to try and install the same versions of
Linux/Apache/mySql and other software as the host I choose. When I set this
up, will I then adjust the line above to read:
$mainpage=$_SERVER['my_development_server_name']."/index.php";
Thanks again for your help...
Phil
[Back to original message]
|