first blog entry
-
Upload
elisesumanga -
Category
Documents
-
view
479 -
download
2
Transcript of first blog entry
![Page 1: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/1.jpg)
inA tutorial made by:Elise Margaret R.
Sumanga
![Page 2: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/2.jpg)
PHP is a widely used
language which stands for
PHP: Hypertext Preprocessor
PHP files can contain text,
HTML, JavaScript code, and PHP
code.
![Page 3: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/3.jpg)
To test PHP files, make sure you’ve installed..
.
![Page 4: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/4.jpg)
XAMPP interprets scripts written in PHP.
XAMPP is an integrated
server package of:
•Apache•mySQL
•PHP• Perl
![Page 5: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/5.jpg)
To test if XAMPP is properly running...
Locate“c:\xampp”folder
Open the xampp_star
t applicatio
n
![Page 6: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/6.jpg)
All PHP files should be saved in the htdocs folder
“c:\xampp\htdocs”
![Page 7: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/7.jpg)
Let’s start this tutorial by opening the text editor that
you’ll fall in with!
![Page 8: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/8.jpg)
I am using Sublime Text 2 and this is what it looks like :D
![Page 9: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/9.jpg)
PHP scripts can be placed
anywhere in the
document.BASIC PHP SYNTAX
It starts with <?php and ends
with ?>
![Page 10: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/10.jpg)
BASIC PHP SYNTAX
![Page 11: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/11.jpg)
To output strings in the browser,
we can use PHP’s echo or print
![Page 12: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/12.jpg)
All PHP files should have .php as its default
file extension.
Let’s save our work and name
it..
Helloworld.php
![Page 13: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/13.jpg)
Again, all PHP files should be saved in the htdocs folder“c:\xampp\htdocs”
![Page 14: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/14.jpg)
After saving, you’ll notice that the color of the code changes
![Page 15: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/15.jpg)
There you have it. Now, it’s time to test the code.
http://localhost/[nameofyourfile.php]
Open your
browser and
type:
![Page 16: first blog entry](https://reader035.fdocuments.in/reader035/viewer/2022062303/5567aa44d8b42ada108b4f8d/html5/thumbnails/16.jpg)
So in our case:http://localhost/helloworld.php