|
|
|||||||||
|
|
Tutorial 1
Save your file as "hello.html" - then save it again as "hello.php" - upload both files to your server and view them in your web browser.
Open up notepad again and write the code to your right: Save this file as "hello2.html" - then save it again as "hello2.php" - again upload both files to your server and view them in your web browser. O.K., so what's to be learned here? First, if you want browsers to read your php, you need to end your file in ".php" - or include it in a file with the ".php" extension (as in 'hello2.php' above). Second if you used your browser to read the source code of the above files, you'd also notice that none of the php - in a php file - is actually visible. In hello2.php, for example, you can view the html tags and "hello" - but the php, like "include" and "echo," doesn't show up anywhere. The only way someone can view your php code - in a php file - is by downloading your file. Your IP address is: 38.103.63.17 |