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 #173544 is a reply to message #173455] Mon, 18 April 2011 18:27 Go to previous messageGo to previous message
Peter Lauren is currently offline  Peter Lauren
Messages: 48
Registered: April 2011
Karma:
Member
On Apr 13, 1:46 pm, William Gill <nos...@domain.invalid> wrote:
> On 4/12/2011 11:06 PM, Peter Lauren wrote:
>
>> That's why I use 'href="http://localhost/file.type"'.  I still
>> confused since using localhost local host works (on my local browser
>> at least) but nothing else has so far.  If the html file making the
>> call is on my machine, would it not look for the localhost on my
>> machine?
>
> Peter,
>
> You seem to be in information overload, and confusing what you know,
> what you think you know, and what you don't know you don't know.  Step
> back and look at some of the individual pieces.
>
> First research the difference between "file://" protocol and "http://"
> protocol. hint: one is telling the browser to look directly in the file
> system (bypassing the server).  The other says "ask the server for a
> resource."
>
> Second study how the server translates a url request (received on the
> network) to the file system location of that resource.
>
> Then look up the different reference schemes (i.e. relative v absolute)
> and that may help you see how href="http://localhost/file.type" can be
> "abbreviated" to href="/file.type" or even href="file.type" in some
> occasions.
>
> copy the following and save it as index.php in the folder indicated by
> the DocumentRoot directive of your httpd.conf file. Enter "localhost" in
> your browser and it will help you begin to feel your way around.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html lang="en">
>    <head>
>    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>    <meta name="generator" content="GCGroup, LLC  -www.gcgroup.net">
>    <link rel="shortcut icon" href="/favicon.ico" />
>    <title>FIND ME</title>
>    </head>
>    <body>
>      Hello <?php echo $_SERVER['REMOTE_ADDR'];?><br>
>      <p>You are here!<br>
>         Document Root: <?php echo $_SERVER['DOCUMENT_ROOT'];?><br>
>         System path:<?php echo $_SERVER['SCRIPT_FILENAME' ]; ?>
>    </body>
> </html>

Hi William,

Thank you very much for your help. I noticed that
$_SERVER['REMOTE_ADDR'];
gives the IP address as 127.0.0.1. Would this be the IP address of
the server and would it give my computer's real IP address if someone
was accessing my server and running this IP script remotely?

Thanks,
Peter.
[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: Fri Nov 29 21:32:14 GMT 2024

Total time taken to generate the page: 0.04377 seconds