View previous topic :: View next topic |
Author |
Message |
Goldmund -
Joined: 19 Feb 2005 Posts: 19 Location: Seattle, WA
|
Posted: Sat Feb 19, 2005 8:45 pm Post subject: Newbie Question: Getting a simple script to work. |
|
|
Hi-
I recently installed Abyss Web Server, and installed PHP 5.0.3 with it to locally test scripts before paying a monthly fee to a web host company. Anyway, since I am very new at this, I was wondering if anyone could give me a brief tutorial on how to test a simple script like:
---------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=ansi" />
<title>Your Feedback</title>
</head>
<body>
<?php print ("Hi"); ?>
</body>
</html>
----------------------------------------------------------------------------------
And get it to appear on my local server browser?
Thanks! _________________ You learn something new every day. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Feb 19, 2005 8:53 pm Post subject: Re: Newbie Question: Getting a simple script to work. |
|
|
Goldmund,
Go to your htdocs/ directory (located inside the Abyss Web Server directory), create a file called test.php and open it using a text editor (such as Windows Notepad) and enter the script source code there. Save the file and go to your browser and request the URL http://127.0.0.1/test.php . _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
Goldmund -
Joined: 19 Feb 2005 Posts: 19 Location: Seattle, WA
|
Posted: Sat Feb 19, 2005 9:46 pm Post subject: |
|
|
Thanks for the info, but it's still not working. I get an error 404 when I type http://ipaddress/test.php into the URL. I'm not sure what's going on. Anyone have any ideas?
Thanks again. _________________ You learn something new every day. |
|
Back to top |
|
 |
roganty -
Joined: 08 Jun 2004 Posts: 357 Location: Bristol, UK
|
Posted: Sun Feb 20, 2005 7:13 pm Post subject: |
|
|
Goldmund wrote: | Thanks for the info, but it's still not working. I get an error 404 when I type http://ipaddress/test.php into the URL. I'm not sure what's going on. Anyone have any ideas? |
check to see if the file isn't saved as "test.php.txt".
if it is then, open the file, and then save it as "test.php" (including the quotes) it should then save it as "test.php" (without the quotes). then try again.
when you view the folder in windows explorer, the file will have the unknown icon, double-click, and when the open with box opens, select "notepad" and making sure that the "Always use this program to open this file" is ticked, then click "Ok" or "Open".
then you won't have to type the quotes every time.
if it isn't check to make sure that the file is saved in the "htdocs" folder _________________ Anthony R
Roganty | Links-Links.co.uk |
|
Back to top |
|
 |
Goldmund -
Joined: 19 Feb 2005 Posts: 19 Location: Seattle, WA
|
Posted: Sun Feb 20, 2005 8:58 pm Post subject: |
|
|
Okay so I opened the test.php (unknown document) with notepad and now the icon looks like a a piece a paper with a notepad on it. It's also in my htdocs folder and it still doesn't work. Do I need to do something else on my console? With the server parameters or something? I really don't understand why it's not working.
Thanks for your help guys. Much appreciated! _________________ You learn something new every day. |
|
Back to top |
|
 |
Goldmund -
Joined: 19 Feb 2005 Posts: 19 Location: Seattle, WA
|
Posted: Mon Feb 21, 2005 1:38 am Post subject: |
|
|
It was the console port number!!! That's what was gave me three days of frustration. Well now everything works. Thanks for helping guys. _________________ You learn something new every day. |
|
Back to top |
|
 |
|