SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    How do I install phplib templates to work with php4 in windows 98? Thanks.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    John there are several ways top implement PHPLIB's classes into your site. There is the traditional prepend.php3 and local.inc. I prefer and will show you how to simply include the specific classes you want to use. Let's say we want the mysql class and the template class for use in our site. I would copy the mysql class and the template.inc file from the phplib dist to your sites root folder. then simply include them into your page. Here is a example usage for the template class.
    Page to call template
    PHP Code:
    include("template.inc");
    $temp = new Template;
    $temp->set_file("box","box.ihtml");
    $temp->set_var("var1""Test data");
    $temp->pparse("output""box"); 
    box.ihtml
    PHP Code:
    <table>
    <
    tr><td>{var1}</td></tr>
    </
    table
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •