+ Reply to Thread
Results 1 to 4 of 4

Thread: Where to Put PHP Code

  1. #1
    clookid's Avatar
    clookid is offline Programmer
    Join Date
    Jan 2007
    Posts
    125
    Rep Power
    0

    Where to Put PHP Code

    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

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    xtraze is offline Programming God
    Join Date
    Dec 2006
    Location
    Sri lanka
    Posts
    911
    Rep Power
    0
    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.

  4. #3
    mohafib is offline Newbie
    Join Date
    Dec 2007
    Posts
    6
    Rep Power
    0

    Re: Where to Put PHP Code

    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

  5. #4
    bbqroast's Avatar
    bbqroast is offline Programming God
    Join Date
    Jul 2010
    Posts
    506
    Blog Entries
    9
    Rep Power
    9

    Re: Where to Put PHP Code

    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).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem in a href location from php code to html code
    By newphpcoder in forum PHP Development
    Replies: 5
    Last Post: 05-13-2011, 02:03 PM
  2. how to make a bar code reader program in VB 2008 please send me the code
    By tontonskie in forum Visual Basic Programming
    Replies: 1
    Last Post: 11-15-2010, 12:58 AM
  3. add code for font size under php echo code
    By newphpcoder in forum PHP Development
    Replies: 2
    Last Post: 11-10-2010, 11:03 PM
  4. Code: Capture Code from USB Camera
    By MrNobody in forum Visual Basic Tutorials
    Replies: 71
    Last Post: 08-14-2009, 08:59 AM
  5. Code: Capture Code from USB Camera
    By MrNobody in forum Tutorials
    Replies: 5
    Last Post: 09-08-2007, 06:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts