how to use php in my site?<

windows

Guest
HI,

How can i use php in my website?
It supports PHP. now i am using only html pages.but i want to use PHP pages. I don't know how to upload and link the php pages. Is there any specified directory structure to follow?

Thanx.
Krishna Srinivasantake a look at <!-- w --><a class="postlink" href="http://www.php.net">www.php.net</a><!-- w --> for manuals and stuff, but here's a quick and dirty PHP tutorial...


most servers recognise a PHP file by the use of a .php extension.

the content of a PHP file can be pure PHP, or pure HTML, or a mix... for example:


<html>
<head>
<title>Some Page</title>
</head>

<body>
<?php
echo "Hello World";
?>
</body>



One of the easiest advantages of PHP to get to grips with is the inclusion of common files - this lets you have your structure seperate from all of your content, and makes site wide fixes very quick to be effected.


Of course, after that, you're going to be getting into dynamic pages, databasing, and all sorts of the wonderful other stuff PHP allows...


but, for now, I recommend you learn to walk rather than take on the marathon...

and do check out <!-- w --><a class="postlink" href="http://www.php.net">www.php.net</a><!-- w --> - it is a good manual there, and feel free to come back and ask "how do I?" questions here :)Hey.. I suggest you learn it, it is a really nice coding language and there is tons of fun and random stuff you can write for websites. Good luck.

-Ryan
 
Back
Top