mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Some typos fix.
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
content down to text and variables only.
|
content down to text and variables only.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
One of the unique aspects about Smarty is the template compling. This means
|
One of the unique aspects about Smarty is the template compiling. This means
|
||||||
Smarty reads the template files and creates PHP scripts from them. Once
|
Smarty reads the template files and creates PHP scripts from them. Once
|
||||||
they are created, they are executed from then on. Therefore there is no
|
they are created, they are executed from then on. Therefore there is no
|
||||||
costly template file parsing for each request, and each template can take
|
costly template file parsing for each request, and each template can take
|
||||||
@@ -170,7 +170,7 @@ debug.tpl
|
|||||||
<para>
|
<para>
|
||||||
Here is how you create an instance of Smarty in your PHP scripts:
|
Here is how you create an instance of Smarty in your PHP scripts:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Create Smarty instance of Smarty</title>
|
<title>Create Smarty instance of Smarty</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
@@ -202,7 +202,7 @@ $smarty = new Smarty;
|
|||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Add library directory to php_include path</title>
|
<title>Add library directory to PHP include_path</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
@@ -263,7 +263,7 @@ $smarty = new Smarty;
|
|||||||
and place it in a subdirectory under the document root called
|
and place it in a subdirectory under the document root called
|
||||||
"/guestbook/".
|
"/guestbook/".
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<title>Technical Note</title>
|
<title>Technical Note</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -275,7 +275,7 @@ $smarty = new Smarty;
|
|||||||
entry with a space.)
|
entry with a space.)
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Lets take a look at the file structure so far:
|
Lets take a look at the file structure so far:
|
||||||
</para>
|
</para>
|
||||||
@@ -445,9 +445,9 @@ require('Smarty.class.php');
|
|||||||
|
|
||||||
class Smarty_GuestBook extends Smarty {
|
class Smarty_GuestBook extends Smarty {
|
||||||
|
|
||||||
function Smarty_GuestBook()
|
function Smarty_GuestBook()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Class Constructor. These automatically get set with each new instance.
|
// Class Constructor. These automatically get set with each new instance.
|
||||||
|
|
||||||
$this->Smarty();
|
$this->Smarty();
|
||||||
@@ -455,8 +455,8 @@ class Smarty_GuestBook extends Smarty {
|
|||||||
$this->template_dir = '/web/www.mydomain.com/smarty/guestbook/templates/';
|
$this->template_dir = '/web/www.mydomain.com/smarty/guestbook/templates/';
|
||||||
$this->compile_dir = '/web/www.mydomain.com/smarty/guestbook/templates_c/';
|
$this->compile_dir = '/web/www.mydomain.com/smarty/guestbook/templates_c/';
|
||||||
$this->config_dir = '/web/www.mydomain.com/smarty/guestbook/configs/';
|
$this->config_dir = '/web/www.mydomain.com/smarty/guestbook/configs/';
|
||||||
$this->cache_dir = '/web/www.mydomain.com/smarty/guestbook/cache/';
|
$this->cache_dir = '/web/www.mydomain.com/smarty/guestbook/cache/';
|
||||||
|
|
||||||
$this->caching = true;
|
$this->caching = true;
|
||||||
$this->assign('app_name','Guest Book');
|
$this->assign('app_name','Guest Book');
|
||||||
}
|
}
|
||||||
@@ -470,7 +470,7 @@ class Smarty_GuestBook extends Smarty {
|
|||||||
<para>
|
<para>
|
||||||
Now lets alter the index.php file to use setup.php:
|
Now lets alter the index.php file to use setup.php:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Editing /web/www.mydomain.com/docs/guestbook/index.php</title>
|
<title>Editing /web/www.mydomain.com/docs/guestbook/index.php</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
@@ -493,7 +493,7 @@ $smarty->display('index.tpl');
|
|||||||
Now you see it is quite simple to bring up an instance of Smarty, just use
|
Now you see it is quite simple to bring up an instance of Smarty, just use
|
||||||
Smarty_GuestBook which automatically initializes everything for our application.
|
Smarty_GuestBook which automatically initializes everything for our application.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
Reference in New Issue
Block a user