update QUICKSTART guide

This commit is contained in:
mohrt
2002-07-24 13:39:08 +00:00
parent 363d635f0c
commit b380292251

View File

@@ -13,17 +13,24 @@ should understand the difference in your OS regarding file permissions.
INSTALLATION INSTALLATION
------------ ------------
**
Note: this installation procedure is quick and dirty, it is meant to get Smarty
working just to see it work. The installation procedure from the Smarty
documentation is much more complete, setting up Smarty in a way that is
reusable for your applications and away from your web server document root.
**
Unpack the Smarty tarball. You will see some files: Smarty.class.php, Unpack the Smarty tarball. You will see some files: Smarty.class.php,
Smarty_Compiler.class.php, Config_File.class.php and a "plugins" directory. You Smarty_Compiler.class.php, Config_File.class.php, debug.tpl and a "plugins"
will need all of these files somewhere in your PHP include path, so when you call directory. You will need all of these files somewhere in your PHP include path,
require("Smarty.class.php") from within your application, it can find the so when you call require("Smarty.class.php") from within your application, it
class. Alternatively, you can set the SMARTY_DIR constant in your application, can find the class. Alternatively, you can define the SMARTY_DIR constant in
and Smarty will use that directory as the path to the Smarty class files. Be your application, and Smarty will use that directory as the path to the Smarty
sure the SMARTY_DIR path ends with a slash! class files. Be sure the SMARTY_DIR path ends with a slash!
Now change directories somewhere inside of your web server document root. For Now change directories somewhere inside of your web server document root. For
this guide, we'll create a directory under the document root named "Smarty", this quick install guide, we'll create a directory under the document root
and put all of our work here. named "Smarty", and put all of our work here.
$> cd /home/htdocs $> cd /home/htdocs
$> mkdir Smarty $> mkdir Smarty
@@ -232,7 +239,7 @@ $smarty->display("index.tpl");
--------- templates/index.tpl -------- --------- templates/index.tpl --------
{include file="header.tpl" title="Home Page"} {include file="header.tpl" title="Home Page"}
{section name=people loop=$FirstName} {section name=people loop=$FirstName}
{$smarty.section.people.rownum} {$FirstName[people]} {$LastName[people]}<br> {$smarty.section.people.iteration} {$FirstName[people]} {$LastName[people]}<br>
{sectionelse} {sectionelse}
There are no values to loop through. There are no values to loop through.
{/section} {/section}