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 #173455 is a reply to message #173431] Wed, 13 April 2011 17:46 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: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>
[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 08:45:39 GMT 2024

Total time taken to generate the page: 0.04829 seconds