Web Design for BeginnersFree top tips for web designers |
What makes a PHP file a PHP files?By James Middleton - Added 29th of August 2008First things firstTo create your first php page, you must firstly ensure that the server that you are uploading the file to, is capable to handle such a file extension. You could either get in touch with your server provider or just continue with this tutorial in hope that all is good. The PHP file formatAny file you create to hold PHP must be saved with the .php extension. With out this, your server won't know how to deal with the page and the data within it will not be 'parse' or engaged in the correct manner. There are methods out there that can fool force the server to treat any file extension as a PHP or any other format. This will envolve the use of an .htaccess file (not covered in this tutorial). Getting your .php file ready to hold PHPNow that you have created your PHP file, you will need to make a distinction between standard HTML, CSS or JavaScript by 'tagging' the portions of the page that will need to be 'parsed'. Example: <?php ...your code... ?> Trying it outAdd the following to your php file and copy it over to the server. <?php echo "Hello <b>world!</b><br>"; ?> This is <b>standard</b> HTML Credits & LinksArticle written by James Middleton - www.webdesign-4-beginners.co.uk.Information for PublishersYou are free to republish this article, provided you retain all hyperlinks as active in the above credits.Add your own comments |
|
Web Design for Beginners is ©Copyright 2008 Turning Turnip Web Design - All rights reserved.
|