About us Privacy Disclaimer Contact us
FAQ Help Advertising Feedback
Home Sitemap Search Donate us

  Home > Computer & I'net > Extensions & Tags...

   Browse by title articles:
   What is hot:

How to Protect Email Addresses...

PHP Introduction

Test Script

Now you see it ...

Comments

Extensions & Tags

Counting Arrays
Good web Design: Site Maps
Dynamic PHP Search Engine - Part II
Search the Web More Efficiently: Tips, Techniques and Strategies
Prev articles1234 5 6789101112Next articles



Extensions & Tags


Computer & I'net articlesExtensions & Tags

by David Stanley    



Check out the extension (file type) showing in the address bar right now. It should be showing php002.php. That extension tells the server that this page contains some php coding in it and should be parsed (executed) before the page is displayed. Some host servers may require a slightly different extension such as .php3 which means the server has version3 of the php module loaded for use. Another extension type may be .phtml. Check with your host on which one they require or just test out each type.

The next step is the PHP tags. This will be one more thing to check with your host (or test yourself) to see which one is usable. All PHP coding is contained within a set of PHP tags.
<?php
coding goes here;
?>

In many cases, a host will support the "short" version which looks like :
<?
coding goes here;
?>

But if you want to stay with backwards compatability, you should leave the PHP part on the first part. It doens't hurt and still works in the newer versions of PHP.

One more thing to note is the semi-colon. Similar to Javascript, each code line is ended/separated by a semi-colon.

For the rest of these tutorial pages, we will be showing the PHP extension for filenames and using the short version of the tags.




-----------------
Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission.





Education Cost




  Disclaimer | Privacy | Terms of useCopyright © 2004 Nice2know.com