Cubeの日記: 人柱レポート:Delphi for PHP(EN) - その3
一通り、同梱のサンプルを開いてみた。
各種サンプルを含め、VCL for PHP では smarty という名前の
テンプレートエンジンを利用しているようだが、
UNIX上で作成されたと思われるこいつが何の手も加えられずに利用されているために
まともに動かないサンプルもあるんですけど・・・
ソースを見てみたら、Windows には '/tmp' なんてディレクトリは存在しないのに
テンポラリの出力先が,完全に '/tmp' と決め打ちされていた。
そこで、"vcl” 配下にある "smartytemplate.inc.php" に加えたパッチがこれ。
Hoge:~/Documents hoge$ diff smartytemplate.inc.php smartytemplate.inc.php.bak
42,58d41
< // Add 2007/04/01 by Cube
< // -------------------------------------------------
< // '/tmp' Directory does not exist on MS-Windows.
< // so Add These Lines.
< if ( preg_match( "/^WIN/i", PHP_OS ) )
< {
< if ( isset( $_ENV['TMP'] ) )
< {
< $this->_smarty->compile_dir = $_ENV['TMP'];
< } elseif( isset( $_ENV['TEMP'] ) ) {
< $this->_smarty->compile_dir = $_ENV['TEMP'];
< } else {
< $this->_smarty->compile_dir = 'C:\TEMP';
< }
< } else {
< // End of Added at 2007/04/01 by Cube
< // -------------------------------------------------
60,61c43,44
< $this->_smarty->compile_dir = '/tmp';
< } // Add 2007/04/01 by Cube
---
> $this->_smarty->compile_dir = '/tmp';
>
# i18n のサンプルに至っては、EN,FR,DE,ES しか対応していないってどういうことか、と小一時間。
# しかも、EN->他言語 に切り替えた後、ENに戻らないって・・・
# 全く機能していないじゃねーかよ。
(追記)
# Deploy ウィザード、腐ってる。
# なにせ、VCL で利用している JavaScript だけエクスポートして、肝心の PHP のライブラリソース(VCL)
# をエクスポートし忘れているのだから・・・
人柱レポート:Delphi for PHP(EN) - その3 More ログイン