Concepts / Your First Script
Subtitles of the Movie
In this movie, you’re going to write your first php script. It’s not going to be anything fancy. Let's start out by writing the html tag and then the head tag, you’ll be familiar with this from html and then we’re going to add a title, which simply says my first php page and we’ll close the head section, open up the body section and here instead of typing in some normal text, we’re going to put in a lesser than sign and a question mark and we’re going to type the echo command, open quotes, Hello world, close quotes and then we need a semi colon at the end and that's it, that's our script. We close the php tag with a question mark followed by a greater than sign and then we end the body tag and finally the html tag. So as we can see, our php script short though it is, is set like an island into the html. Lets save that, I’m going to save that into examples and that's within the document root folder of our web server and we’re going to save that as hello world.php. Now if we pop over to our browser and load that using the local host address, we’re going to load the hello world php script that we've just written. As we can see, hello world has been echoed to the browser. If we take a look at the source of that, as we can see, the php script has been processed by the server software and all that's been out put is the text which was output to the browser. That concludes this chapter.
Tutorial Information
| Course: | PHP |
| Author: | Joshua Mostafa |
| SKU: | 33332 |
| ISBN: | 1889347787 |
| Release Date: | 2002-03-26 |
| Duration: | 9.5 hrs / 92 lessons |
| Work Files: |
Yes |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 70,000 Video Tutorials (14,250 free)
- Video Available as Flash or QuickTime
- Over 650 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 