|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
deflator mouse Smarty n00b
Joined: 23 Oct 2003 Posts: 4
|
Posted: Mon Oct 27, 2003 2:56 am Post subject: smarty produces blank page |
|
|
I've installed smarty, used the demo script included after changing my path, and all i get is a blank screen.
ive tried changing my path to the absolute path, and tried putting the demo in the same dir as the class and simply including the class. but all i get is a blank page. error_reporting is enabled on my server and i tried putting 'error_reporting(E_ALL); ' in my script but nothing happened.
any suggestions? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Oct 27, 2003 3:44 am Post subject: |
|
|
yes, post your code |
|
Back to top |
|
deflator mouse Smarty n00b
Joined: 23 Oct 2003 Posts: 4
|
Posted: Tue Oct 28, 2003 7:50 pm Post subject: |
|
|
ok, heres the script i tried, its basically the packaged demo...
[php:1:26bda31d97]<?php
error_reporting(E_ALL);
require '/var/www/html/Smarty.class.php';
$smarty = new Smarty;
$smarty->compile_check = true;
$smarty->debugging = true;
$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
array("I", "J", "K", "L"), array("M", "N", "O", "P")));
$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");
$smarty->display('index.tpl');
?>[/php:1:26bda31d97] |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Oct 29, 2003 1:10 am Post subject: |
|
|
You have to create the directories you are instructed to create in the installation. Ie. you must create the templates_c/ and cache/ directories in the appropriate locations for your setup and furthermore, ensure that they have proper permissions. Since you are using the defaults, do so in the Smarty dir.
Presently, there is no simple one-size-fits-all unpack-this-and-go demo of Smarty.
See: basic installation, extended setup. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|