PHPycho
03-02-2007, 10:10 AM
Hello forum
i am getting problem in smarty
case:
wwwroot/mySite/admin has files like
-index.php
-listA.php
-listB.php
/templates/ folder has
-header.tpl
-footer.tpl
-index.tpl
-listA.tpl
-listB.tpl
index.php contains
<?php
//in upper section it includes all the class files and creates the respective objects
// neccessary processing goes here...
$smarty->display("index.tpl");
?>
index.tpl contains
{php}
if(isset($_GET['action']))
{
$filename = $_GET['action'].".php";
if(file_exists($filename))
{
include "$filename";
}
else
{
//error
}
{/php}
:::means it automatically includes the file as per $_GET action
suppose i clicked on the link ?action=listA then it auto includes the page listA.php which then display the array data in listA.tpl
problem:
It was working in normal case ie without using smarty but Now whenever i clik on the links
it shows:
Call to a member function selectAll() on a non-object in C:\Program Files\xampp\htdocs\mySite\admin\listA.php on line 39
i am not getting the solution please help.
Thanks in advance to all of you!!
i am getting problem in smarty
case:
wwwroot/mySite/admin has files like
-index.php
-listA.php
-listB.php
/templates/ folder has
-header.tpl
-footer.tpl
-index.tpl
-listA.tpl
-listB.tpl
index.php contains
<?php
//in upper section it includes all the class files and creates the respective objects
// neccessary processing goes here...
$smarty->display("index.tpl");
?>
index.tpl contains
{php}
if(isset($_GET['action']))
{
$filename = $_GET['action'].".php";
if(file_exists($filename))
{
include "$filename";
}
else
{
//error
}
{/php}
:::means it automatically includes the file as per $_GET action
suppose i clicked on the link ?action=listA then it auto includes the page listA.php which then display the array data in listA.tpl
problem:
It was working in normal case ie without using smarty but Now whenever i clik on the links
it shows:
Call to a member function selectAll() on a non-object in C:\Program Files\xampp\htdocs\mySite\admin\listA.php on line 39
i am not getting the solution please help.
Thanks in advance to all of you!!