Home | Online Examples | Documentation | Forum | Page of Project | Download

TPLN Manual

ShowRecords function

RewriteUrl
SetNavColor
SetUrl
UrlAddVar
CreateFieldVars

 

RewriteUrl

void RewriteUrl(string patterns, string replace)

The RewriteUrl() function serves to reformat the urls generated by the blocks of the ShowRecords functions. For more of information: http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


<?php

include("TPLN/TPLN.php");

$TPLN = new TPLN;
$TPLN->Open("template.html");
$query = "SELECT * FROM my_table";

$TPLN->DbConnect();
$TPLN->RewriteUrl('test.php','test.html'); // rewrite all url by test .html
$TPLN->SetNavColor("#CCCCCC","#FFFFFF");
$TPLN->ShowRecords($query,10); // 10 results by page
$TPLN->DbClose();

$TPLN->Write();

?>


Attention !
Don't forget to backslash your sensitive characters in your regullary expression ! ( ? included )
TopTop