Hello. I have just started to explore Fasttemplate and now I´m trying to make a dynamic block to write the alfabet. But I just get this failure
Warning: Bad arguments to implode() in klasser/class.fasttemplate.php on line 147
ERROR: get_template() failure: [templates/]
The code is just
index.php
<?
if($pg=="") {
if($QUERY_STRING!="") {
$pg=strtok($QUERY_STRING, "&");
if(strchr($pg,"="))
$pg="front";
} else
$pg="front";
}
$incfiles = "incfiles";
//Skapar en instans av klassen
/Argumentet till konstruktorn är var någonstans som du förvarar dina templatesfiler /
require("klasser/class.fasttemplate.php");
$tpl = new FastTemplate("templates/");
require("../../dbsettings.inc.php");
require("$incfiles/common.inc.php");
if(file_exists("$incfiles/$pg.inc.php"))
require("$incfiles/$pg.inc.php");
//Sedan definierar vi filerna
$tpl->define(array(main => "main.tpl", meny => "meny.tpl", showrecord => "showrecord.tpl", page => "$pg.tpl"));
//Tilldelar TITLE och MAIN dess värden
$tpl->assign(TITLE, "[nanne.net] version 5.0 Tidningsversionen");
//Kör allt genom metoden parse()
$tpl->parse(MENY,".meny");
$tpl->parse(PAGE, ".page");
$tpl->parse(MAIN, array("main"));
//Skriver ut allt med Fastprint()
Header("Content-type: text/plain");
$tpl->Fastprint();
$tpl->Clear_all();
exit;
?>
records.inc.php
<?
$chararr = Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","å","ä","ö");
$tpl->define_dynamic("rader","page");
for($i=0;$i<=count($chararr); $i++) {
$tpl->assign(array(R_CHAR_LOW => $chararr[$i],
R_CHAR_HIGH => strtoupper($chararr[$i])));
$tpl->parse(ALFABET, ".rader"); <-- This line is getting wrong
}
?>
Hmm.. i hope this is enoug to say what I´m doing wrong. (I bet it´s just something that a blind person can miss)
Thanks!
/N