Welcome to my
article, in regard to Easy method learning PHP Porgramming
Here you are on my first post about the PHP programming in this site . now , we will discuss a simple program.
I just wanna say
"Welcome to Amin Setiawan Lahagu blog!"
Then, open the file in notepad and type the following program:
Then, open the file in notepad and type the following program:
<?
$ yourname = "Amin Setiawan Lahagu";
echo "Welcome $ yourname in my world!" ;
?>
1stexperience.php save the name and place in the folder c: \ apache \ htdocs \ test \
Make sure you have made a test folder in c: \ Apache \ htdocs
$ yourname = "Amin Setiawan Lahagu";
echo "Welcome $ yourname in my world!" ;
?>
1stexperience.php save the name and place in the folder c: \ apache \ htdocs \ test \
Make sure you have made a test folder in c: \ Apache \ htdocs
To
run the program above, then steps:
1. Run the service by clicking the Start | Program | PHPTriad/xamp server/wamp | Apache | Start Apache
2. Open Muzzila firefox
3. In the MF Address type //Localhost/test/1stexperience.php
4. See the result is going to be like this?
1. Run the service by clicking the Start | Program | PHPTriad/xamp server/wamp | Apache | Start Apache
2. Open Muzzila firefox
3. In the MF Address type //Localhost/test/1stexperience.php
4. See the result is going to be like this?
Explanation:
1. <? This symbol is an escort writing PHP program
2.?> End symbol To close the program writing php
3. Program PHP always given .php extension, this is because service of web server will execute the file with ext.
4. $ yourname -> define variables so there is a $ sign yourname
5.; each statement ends with a semicolon command.
6. echo "SENTENCE THAT WANT DISPLAYED" useful for displaying the sentence. Now you notice in appearance Welcome FOLLOW variables: $ yourname displayed contents. So it will display a welcome Amin Setiawan Lahagu in my world!
7. // localhost / test is a test that is in the folder in c: / apache / htdocs. Localhost means the server name that is active, that is your own computer.
Hopefully , be
patient for my next article about php programming. click here