SMARTY_DIR
This is the full system path to the location of the Smarty class files. If this is not defined in your script, then Smarty will attempt to determine the appropriate value automatically. If defined, the path must end with a trailing slash/.
Example 11-1. SMARTY_DIR
// set path to Smarty directory *nix style
define(‘SMARTY_DIR’, ‘/usr/local/lib/php/Smarty-v.e.r/libs/’);
// path to Smarty [...]
Comments
Template comments are surrounded by asterisks, and that is surrounded by the delimiter tags like so:
{* this is a comment *}
Smarty comments are NOT displayed in the final output of the template, unlike <!– HTML comments –>. These are useful for making internal notes in the templates which no one will see
Example 3-1. Comments within a [...]
Hello World (basic)
Table of Contents
Further reading
When you begin to learn a programming language, the first program you often write is a ‘hello world’ program. So, just to fit in with everyone else, the first tutorial in this manual just happens to be a ‘hello world’ tutorial!
Throughout the tutorials we expect a reasonable grasp of PHP [...]
Installation on Linux
The best way to install PHP-GTK 2 on Linux is to compile it. No binary or source packages are available as yet for any distribution, so you can’t use your favorite package manager to install PHP-GTK 2! These instructions should be valid for most distributions of Linux, as well as other POSIX compliant [...]
Installation on Windows
Using Gnope
Gnope has proven to be the most easiest way of installing and maintaining PHP-GTK 2 on Windows. Gnope is a fully featured PHP-GTK 2 installer, complete with PHP 5.1, GTK 2.6 and PEAR. A few simple mouse clicks and you’re done!
Just download the installer from gnope.org and follow the on-screen instructions. Gnope also has [...]
Booleans
This is the simplest type. A boolean expresses a truth value. It can be either TRUE or FALSE.
Note: The boolean type was introduced in PHP 4.
Syntax
To specify a boolean literal, use the keywords TRUE or FALSE. Both are case-insensitive.
<?php
$foo = True; // assign the value TRUE to $foo
?>
Typically, some kind of operator which returns a [...]