|
Posted by Andy Hassall on 12/21/05 16:43
On 20 Dec 2005 19:33:10 -0800, "gjdagis" <gjdagis@hvc.rr.com> wrote:
>This is my first day trying to learn PHP and ALREADY I'm stumped. I
>bought the SAMS Guide toPHP. MySQL, and Apache Book. On page 18 it
>tells me to create a file called phpinfo.php. HOW do I create a PGP
>file ?
PHP, not PGP. PGP is an encryption program.
>I have Word etc but programs like this create TEXT files etc. ,
>DON'T THEY? I created it anyway and did as told. Was this OK ?
PHP files are text files. The extension of a filename (the bit after the ".")
has nothing to do with the contents of the file - all it does is, on Windows
anyway, help to let the operating system know what program to open the file
with.
When you're running PHP in a webserver it has a similar function; you would
earlier have set up your webserver to run files ending with .php through the
PHP interpreter, instead of just serving the file directly as it would by
default.
>The file looks like this
><?php
>phpinfo();
>?>
>and was created in WORD saved as phpinfo.pgp
phpinfo.php.
Ensure it's not saved it as phpinfo.php.txt, as the Microsoft programs have a
bad habit of doing that.
If you're on Windows XP, make sure you have the "Hide file extensions" option
turned OFF (somewhere in Options when you have a directory window open) as this
will just confuse things further.
>Secondly: On the same page (after creating the above and putting it
>into C:/Apache/Apache2/htdocs as told) it says to point the web browser
>to http://localhost/phpinfo.php and I should see the PHP information
>page. All my browser does is hang up while searching for the page.
Is your webserver running?
Did the book start with the basics first, getting Apache to serve up a plain
page first before moving on to PHP?
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|