saboten-smarty.blogspot.com
Smartyはじめました!
http://saboten-smarty.blogspot.com/2007/12/phpsmarty-pc-phpsmarty-ip-smarty-pc.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 1.ユーザーエージェントやIPなどで携帯からのアクセスか、パソコンからのアクセスかを判別する。 PEARを使った携帯・PCのアクセス判別や、テンプレート・ディレクトリの切り替えに関するソースを省いた必要な部分が以下。 Class Smarty Ex extends Smarty{ function display($template, $cache id = null, $compile id = null) { / 携帯なので結果をいったん変数に $output=parent: fetch($template); / 半角カナにしてパケ代をとりあえず節約。 $output=mb convert kana($output,"k","UTF-8"); / SJISに変換しましょう。 $output=mb convert encoding($output,"SJIS","UTF-8"); echo $output; } }.
saboten-smarty.blogspot.com
Smartyはじめました!: 2008/02
http://saboten-smarty.blogspot.com/2008_02_01_archive.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 Smarty を使った開発でデバッグを行う 4 つの方法. PHPerなWebプログラマ。デザインや、たまにPerlCGIのメンテ。必要に応じてJavascript。Cake Symfony。guessworkを好む。気が向いたらPython、Actionscript、Processing。生かす案件は無いので趣味状態。 Awesome Inc. テンプレート. Powered by Blogger.
saboten-smarty.blogspot.com
Smartyはじめました!: 時刻のselect要素が作成できる - {html_select_time}関数
http://saboten-smarty.blogspot.com/2007/08/select-htmlselecttime.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 時刻のselect要素が作成できる - {html select time}関数. 12289; Time Minute. 12289; Time Second. を指定する事で、時間要素が連想配列で $ POST. に渡される(例だと $ POST["time"]=Array(["Hour"],["Minute"],["Second"]). Name属性に負荷する接頭辞[デフォルト:Date 、Tme ]. PHPerなWebプログラマ。デザインや、たまにPerlCGIのメンテ。必要に応じてJavascript。Cake Symfony。guessworkを好む。気が向いたらPython、Actionscript、Processing。生かす案件は無いので趣味状態。 時刻のselect要素が作成できる - {html select time}関数. テンプレートファイル内にPHPスクリプトを記述する - {php}/{include php}.
saboten-smarty.blogspot.com
Smartyはじめました!: foreachとsectionの比較
http://saboten-smarty.blogspot.com/2007/10/foreachsection.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 プログラミングにおいて、同じような処理をする関数ではどちらが処理速度が速いのか、というのは議論になるところと思います。 当たり前ですが、処理が単純で引数などがない方が速い様に思います。確か 条件分岐があるだけでもプログラムの処理は一気に遅くなる. Foreach from=$custid item=curr id} id: {$curr id}. Php $ from = $this- tpl vars['custid']; if (! Is array($ from) &! Is object($ from) { settype($ from, 'array'); }if (count($ from) : foreach ($ from as $this- tpl vars['curr id']):? Php echo $this- tpl vars['curr id'];? Php endforeach; endif; unset($ from);? 0 : $this- sections['custom...
saboten-smarty.blogspot.com
Smartyはじめました!: 2007/07
http://saboten-smarty.blogspot.com/2007_07_01_archive.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 Smarty.now date format:"%Y-%m-%d %H:%M:%S"}. Smarty.now date format}. 日付フォーマットの指定がないデフォルトでは、 %b %e, %Y. Jul 4, 2007. 短縮形の月名,1~31の日付(一桁の日にちはスペースがつく),4桁の西暦年. Smarty- assign('date', strtotime('-1 day') ;. Date date format:"%Y年%m月%d日 (%a)}. Http:/ sunset.freespace.jp/smarty/SmartyManual 2-6-5J html/language.modifier.date.format.html. Http:/ www.bnote.net/php/php/19 smarty var.shtml. Awesome Inc. テンプレート. Powered by Blogger.
saboten-smarty.blogspot.com
Smartyはじめました!: 2008/01
http://saboten-smarty.blogspot.com/2008_01_01_archive.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 12304;PHP TIPS】 68. Smartyのmodifierを使いこなそう. Smartyでは 、assignされた変数に処理を与えるmodifier という機能がある。 PHP関数をパイプ「 」でつなげて記述して使用します。 Smarty- assign('name', 'atsushi');. Name strtoupper} / 結果:ATSUSHI. Modifierに配列を渡す場合は、関数名の前に「@」をつける。 Name list = array( '0' = 'atsushi', '1' = 'yoshiki', '2' = 'miwa', '3' = 'hiroshi', '4' = 'saito' ); $smarty- assign('name list', $name list);. Name list @count} / 結果:5. Modifierには「:」をつけることで引数を渡すこともできる。 Name substr:'1':'3'} / 結果:tsu.
saboten-smarty.blogspot.com
Smartyはじめました!: Smarty を使った開発でデバッグを行う 方法
http://saboten-smarty.blogspot.com/2008/02/smarty.html
Smarty初心者覚書。リファレンスでは有りません。習うより慣れろ。実践で覚える。体で覚える。 Smarty を使った開発でデバッグを行う 4 つの方法. PHPerなWebプログラマ。デザインや、たまにPerlCGIのメンテ。必要に応じてJavascript。Cake Symfony。guessworkを好む。気が向いたらPython、Actionscript、Processing。生かす案件は無いので趣味状態。 Awesome Inc. テンプレート. Powered by Blogger.
cakephp-saboten.blogspot.com
PHP on the Cake !: DBの切り替え - database.php
http://cakephp-saboten.blogspot.com/2008/12/db-databasephp.html
PHP on the Cake! CakePHP のインストール、設定法、使用例。愛すべき駄目プログラム言語・PHP による Web アプリケーションの品質向上の為に。 DBの切り替え - database.php. CakePHP Users in Japan. テスト用・公開用などでDBの切り替えしたり、複数のDBを使い分ける場合。 12300;app/config/database.php」に好きなだけ定義。 Class Test extends AppModel. UseDbConfig = "default";. UseDbConfig = "test";. PHPerなWebプログラマ。デザインや、たまにPerlCGIのメンテ。必要に応じてJavascript。Cake Symfony。guessworkを好む。気が向いたらPython、Actionscript、Processing。生かす案件は無いので趣味状態。 DBの切り替え - database.php. ページャー/ページ送り - PEAR: Pager,Pagination,(1.2)Paginato.
cakephp-saboten.blogspot.com
PHP on the Cake !: 全文検索
http://cakephp-saboten.blogspot.com/2009/01/blog-post_06.html
PHP on the Cake! CakePHP のインストール、設定法、使用例。愛すべき駄目プログラム言語・PHP による Web アプリケーションの品質向上の為に。 He Bakery, Everything CakePHP. IBM's resource for developers and IT professionals in Japan. PHPerなWebプログラマ。デザインや、たまにPerlCGIのメンテ。必要に応じてJavascript。Cake Symfony。guessworkを好む。気が向いたらPython、Actionscript、Processing。生かす案件は無いので趣味状態。 Awesome Inc. テンプレート. Powered by Blogger.
cakephp-saboten.blogspot.com
PHP on the Cake !: 1月 2009
http://cakephp-saboten.blogspot.com/2009_01_01_archive.html
PHP on the Cake! CakePHP のインストール、設定法、使用例。愛すべき駄目プログラム言語・PHP による Web アプリケーションの品質向上の為に。 He Bakery, Everything CakePHP. IBM's resource for developers and IT professionals in Japan. CakePHP Users in Japan. Define('DEBUG', 2);. Define('DEBUG', 0);. また、このエラーページは「cake/libs/view/errors/error404.ctp」に存在するのでカスタマイズする場合は「app/views/errors/error404.ctp」を作成して行う。 Awesome Inc. テンプレート. Powered by Blogger.