FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Runs In WinXP Command Window But Not In Browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Runs In WinXP Command Window But Not In Browser [message #173463 is a reply to message #173435] Wed, 13 April 2011 19:13 Go to previous messageGo to previous message
William Gill is currently offline  William Gill
Messages: 31
Registered: March 2011
Karma:
Member
On 4/12/2011 11:43 PM, Peter Lauren wrote:
> I have no problem with localhost except that Denis seems to be saying
> that it won't work over the Internet. I'm new at this so may be
> misinterpreting what he is saying.

Yes, I think you are misunderstanding what he is saying. Elsewhere I
suggested you look at things in pieces. I missed one; DNS. The internet
is millions of computers connected, each having a unique (well
technically that can be obfuscated too) address. Rather than having to
know the actual address of each, they devised a naming system so that
rather than having to remember 74.125.225.17, a user just asks for
Google.com. Some addresses are nonroutable (can't be used across the
internet. i.e. 192.x.x.x) and one is even more restricted, "127.0.0.1".
It is named localhost (meaning this computer).

All public DNS names are registered to prevent conflict on the internet.
However, you can override the "name to address" look up via your hosts
file. For example you could add the line "www.google.com 127.0.0.1"
then whenever you enter "www.google.com" into your browser, it will go
to your local host (assuming you are running a properly configured
server). BUT and this in important, only the computer whose hosts file
has been modified will do this. Everyone else will go to the actual
www.google.com site.

Now back to your misinterpretation. If you use localhost to build and
test, 'href="http://localhost/path/file.type"' will work on your server
but no one else's. You would either need to replace the
"http://localhost" part with the actual server name (i.e.
"http://www.example.com"), OR you could use a reference that tells the
server "Find 'path/file.type' in the domain that got you here to begin
with", then the "href=" would work on your localhost/development server
AND ALSO on the public server when you publish the page.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: neither var_dump() nor die() displays anything
Next Topic: Spaces in filenames
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 13 00:46:20 GMT 2024

Total time taken to generate the page: 0.06334 seconds