require_onceでなくautoload

require_once からの卒業~(尾崎豊風に) – Devel::Bayside

PHP5 では __autoload というメソッドをオーバーライドすることで、require_once から解放されます。Zend Framework を使うことで、この機能を意識せずに使えるようになります。

autoloadを使えば楽ちんな上に、require_onceよりも早いので1粒で二度美味しい感じです。
記事ではオレオレMVCとして、Zend Frameworkを部分毎に利用したフレームワークを作成されています。

関連する記事:

Powered by

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">