|
-
Nov 10th, 2003, 05:00 PM
#1
Thread Starter
Fanatic Member
help needed "first php script"
I am new to PHP
My first script failed when I wanted to copy and paste my first script to the "windows NOTE PAD"
all I can see is a blank file.txt
what do u think is the problem..and What do I need to have first?
thanks
-
Nov 10th, 2003, 08:51 PM
#2
Member
Are you sure you saved it as a .php file? When saving, try saving it as (with quotes) "first.php".
And how are you trying to run it? You can't just open up a browser and open your file like you can do with HTML. PHP needs to be parsed by the PHP program. Either install PHP on your computer (http://easyphp.org is an easy way) or host your file on a server that supports PHP.
-
Nov 11th, 2003, 05:36 AM
#3
Open notepad
Paste script
Save as "something.php" in root directory
Open browser
http://localhost/something.php
(assuming you have PHP installed and a server running)
-
Nov 11th, 2003, 09:44 AM
#4
Thread Starter
Fanatic Member
instaling php
yes but this time it is asking me "which program is it asocciated with?
But yesterday I downloded "php 4.3.4" it is not in the list...which file should I put in windows /system so that it can be associated ..
thanks
-
Nov 12th, 2003, 01:02 AM
#5
Stuck in the 80s
There are a few threads that you can find if you do a search about installing PHP. In order for PHP to run, you must have server software, like Apache.
Download Apache and set it up, verify that it works.
Install PHP for Apache and veryify that it works.
You can't just execute a page by double clicking on it, you'll have to browse to it through your browser, http://localhost/yourfile.php
Also know where your web directory is, the default or wherever you changed it to.
If you don't want to do all this, find a host that has PHP and get an account with them. Then you'll just have to upload your files.
-
Nov 12th, 2003, 10:55 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|