You are here: Re: Cannot get mysql_connect to work « PHP Programming Language « IT news, forums, messages
Re: Cannot get mysql_connect to work

Posted by Gordon Burditt on 12/28/05 07:22

>Thanks for your help. I guess I'm a little confused about localhost. It

localhost refers to the local machine. The *whole* machine, not
just one directory on it.

>seems that if I open a file in the browser at
>http:/localhost/myFile.html, it actually refers to the file
>/var/www/html/myFile.html.

On the local machine.

If I ftp to localhost and log in as 'gordon', I end up in my home
directory on the local machine. If I ftp to localhost and log in
as 'ralph', I end up in Ralph's home directory on the local machine.
If I http to localhost and request /, I get the web server's document
root directory (or an index file in it). If I ping localhost, I
get *no directory whatever*, I just get ping replies back. If I
log in on MySQL to localhost, I get the database I asked for, and
who cares what directory it's kept in (sometimes databases are
jumbled together in one large file, but if MySQL can figure it out,
that's fine with me) if I get the right one? If I connect an IRC
client to localhost, I end up talking to the IRC server on my local
machine (assuming one exists), and the directory is not relevant.

>So it seems there are two meanings to
>localhost? In one context it refers to the local machine via ip
>address 127.0.0.1, and in the context of the browser, (with Apache
>running?), localhost refers to a specifc directory path on the local
>machine. This is why I'm confused. Can you shed any light on this?

localhost refers to the local machine. The *whole* local machine.
Any directory is implied or specified by parts of the request other
than the hostname.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация