<?php
var $validate = array(
'account' => array(
'文字数制限' => array(
'rule' => array('custom', '/[a-z0-9]{4,16}$/i'),
'message' => '半角英数4文字以上16文字以内でお願いします'),
'空入力禁止' => array(
'rule' => 'notEmpty',
'message' => 'なんか挿れてください')
)
);
?>
misaki: 2009年1月アーカイブ
CentOS 5 に mod_layout モジュール導入のメモ。
意外と簡単にできました。
ただCGI等の出力の問題、RSS等にも反映されてしまう問題もあるみたいなのでその辺を調べていこうと思います。
- apxs(httpd-devel)のインストール
- 公式サイト(tangent.org)よりダウンロード → 展開 → make → make install
- Apache再起動
- .htaccess等に下記のように指定します
yum -y install httpd-devel
# cd /usr/local/src
# wget http://download.tangent.org/mod_layout-5.1.tar.gz
# tar xvzf ./mod_layout-5.1.tar.gz
# cd ./mod_layout-5.1
# make
# make install
# apachectl restart
AddOutputFilter LAYOUT html
LayoutHeader header.html
LayoutFooter footer.html
※レイアウトファイルを更新しても、Apacheを再起動しないと反映されない...かも?
$this->action : アクション名
$this->viewPath : ビューテンプレートを格納しているディレクトリ名
などなど。ほとんど参照できる。