This domain may be for sale!
Ethna > ドキュメント > 開発マニュアル > PATH_INFOを使ったRequest-URIからのパラメータの取得 PATH_INFOを使ったRequest-URIからのパラメータの取得 書いた人: いちい 概要 Request-URIからパラメータを取得したいときは、Ethna_UrlHandlerクラスを使うと便利です。 Ethna_UrlHandlerは次の2つの機能を持っています。 PATH_INFOからaction, リクエストパラメータへの変換 エントリポイントとPATH_INFOからactionを決定する PATH_INFOから$_REQUESTなどにパラメータをインポートする コントローラに組込み済み action, パラメータからPATH_INFO(に相当するパス文字列)への変換 actionからエントリポイントを決定 その他のパラメータからPATH_IN
先日お伝えした、CVS版に上がっている Ethna_UrlHandlerについて簡単な解説でもしてみようかなと。 大事なお知らせ根本的な部分を勘違いしている予感がしたので、ちょっとこの記事はあてにしないでください。 一応、続きに残しておきますが。。。 概要: Ethna_UrlHandlerって?URLをハンドリングして /blog/archive/2006/08/26/ みたいなアドレスが使えるようになります。みんな待ってたよ!(笑) 準備: プロジェクト作成準備として、最新のCVS版を用いて、 $ ethna add-project project /path/to/projectsして、プロジェクトを生成しておきます。 すると、project/app/Project_UrlHandler.php というファイルが生成されているはずです。 そのファイルの中の、
Ethna(ethna.jp, beta.ethna.jp)を試してみることにする。PHP5にPEARでインストール。 $ pear channel-discover pear.ethna.jp $ pear install ethna/ethna-beta ファイルの文字コードがEUC-JPなので全部UTF-8にする。テンプレートのcharsetも置き換える。 <?php $ethna_dir= '/path/to/lib/php/Ethna'; //ここで決め打ち $pattern = $ethna_dir.'/*'; $files=glob($pattern); while(count($files) > 0){ foreach($files as $file) { conv_file($file); } $pattern.='/*'; $files=glob($pattern);
PHP 勉強会でいろいろと聞かされたし、藤本さんともお話したので、PHP の和製フレームワーク Ethna を見てみようと手元のマシンに入れてみる。 環境: Windows XP Professional SP2, PHP5.1.1, PEAR1.4.6 PEAR のアップデート(念のため) cd C:php-5.1.1 (このパスは一例。自分が入れた場合の場所) pear update PEAR Ethna のダウンロードとインストール Ethna のダウンロードページから、 Sourceforge.jp の配布ページへ Ethna-0.2.0.tar.gz を選択、ダウンロード コマンドプロンプトを開き、ダウンロードしたファイルの場所へ pear install Ethna-0.2.0.tar.gz PEAR と同じ場所に Ethna というディレクトリができる PEAR に PATH
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く