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
Printable View
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
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.
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)
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
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.