Date: 07/14/00
- Next message: Kristian Koehntopp: "Re: [phplib] mail() function"
- Previous message: Fadi Chakik: "[phplib] Installing PhPLIB 7.2"
- Next in thread: Kristian Koehntopp: "Re: [phplib] Problem with PHPLIB Templates"
- Reply: Kristian Koehntopp: "Re: [phplib] Problem with PHPLIB Templates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm new to PHPLIB and I'm trying to get the example templates to work. The
problem is that when I do the following:
<?php
include("./template.inc");
# create Template instance called $t
$t = new Template("e:/cpr/php_upr", "keep");
# define variables named page and box, referencing files
$t->set_file(array(
"page" => "page.ihtml",
"box" => "box.ihtml"));
# extract the block named "row" from "box", creating a
# reference to {rows} in "box".
$t->set_block("box", "row", "rows");
# define the variables TITLE and PAGETITLE
$t->set_var(array("TITLE" => "Testpage",
"PAGETITLE" => "hugo"));
# define NUM and BIGNUM, then append "row" to "rows"...
for ($i=1; $i<=3; $i++) {
$n = $i;
$nn = $i*10;
$t->set_var(array("NUM" => $n, "BIGNUM" => $nn));
$t->parse("rows", "row", true);
}
# build out from box, then build out from page...
$t->parse("out", array("box", "page"));
# finish out and print it.
$t->p("out");
?>
<hr>
<?php
# report leftover variables, if any.
print implode(", ", $t->get_undefined("rows"));
?>
I get the following error:
Template Error: filename: file E:/cpr/php_upr/E:/cpr/php_upr/box.ihtml does
not exist.
You will notice that the path is duplicated.
What am I doing or setting wrong?
--Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Kristian Koehntopp: "Re: [phplib] mail() function"
- Previous message: Fadi Chakik: "[phplib] Installing PhPLIB 7.2"
- Next in thread: Kristian Koehntopp: "Re: [phplib] Problem with PHPLIB Templates"
- Reply: Kristian Koehntopp: "Re: [phplib] Problem with PHPLIB Templates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

