Where to put PHP code
When the PHP program runs through your script, it looks for either <?php or <? then runs everything from there until the next ?>
You can configure PHP to run code between <% and %> tags too (ASP) though on IIS this probably isn't the wisest of ideas.
You need to tell your web server to run PHP files through the PHP program, too. This depends on which web server you have, though the PHP package has good instructions for most of the popular types. You should put your PHP code in files with the extension .php and configure your webserver to run .php files through the PHP program, though you can also force PHP to handle all .html files. The advantage to setting up .php as an extension is that files with no PHP code won't go through the PHP program, so you'll get better server performance.
This tutorial was written by another one of my friends, if you would like to use this tutorial please send me a PM
But, this limits us to use .php for php codes doesn't it and we cannot add php codes into HTML if this is done. But if it does improve server performance, I will try if I get a VPS or Dedicated.
Hi,
clookid plz am newbie in PHP, plz can u help me? in my work place they ask me the create a Databank for our Staff, to verifed them for payment of salary, but i don't know how to create it. if u can help me am very happy here is my email mohafib@yahoo.com.
thank u very much and god bless u and ur family
xtraze:
Simply solution:
Rename all your .html files to .php, Oh wait I guess that does kinda compromise run speed
TO be honest on a PHP server every page should be using PHP for headers and footers (even without MySQL you can use the include or require functions).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks