with Smarty - セットアップ
S2Base.PHP5 のインストール
セットアップに従って S2Base.PHP5 をインストールして下さい。
Smarty のインストール
- Smartyをダウンロードし、任意のディレクトリに解凍して下さい。
- s2base.php5/vendor/plugins/smarty/config/environment.inc.php にて、Smarty-version/libs/Smarty.class.php を require して下さい。
public ディレクトリの公開
s2base.php5/public ディレクトリを WEB 公開ディレクトリとして設定して下さい。
var ディレクトリのアクセス権限設定
WEBサーバの実行ユーザが、s2base.php5/var ディレクトリ以下にアクセス(read/write)できる設定として下さい。
build.xml の編集
s2base を PEARパッケージでインストールした場合は、s2base コマンドに 第2引数 smarty を付加してプロジェクトディレクトリを作成します。% s2base /path/to/project/dir smartys2base.php5 ディレクトリにて phing コマンドを実行します。コマンドリストが表示されるとインストールが完了です。
% phing smarty
Buildfile: /seasar.php/workspace/s2base.php5/build.xml
project > prepare:
[php] Evaluating PHP expression: require_once('config/environment.inc.php')
[php] Evaluating PHP expression: require_once('lib/S2Base/S2Base.cmd.php')
project > smarty:
[phing] Calling Buildfile '/seasar.php/workspace/s2base.php5/vendor/plugins/smarty/build.xml' with target 'command'
project > command:
[php] Evaluating PHP expression: require_once('vendor/plugins/smarty/config/environment.inc.php')
[ Command list ]
0 : [ EXIT ]
1 : action
2 : interceptor
3 : module
4 : command
5 : dao
6 : dicon
7 : entity
8 : goya
9 : service
choice ? : 0
BUILD FINISHED
Total time: 2.3441 seconds
%