Reply to Ways to avoid require_once and re-denifition

Your name:

Reply:


Posted by Veikko M�kinen on 10/15/94 11:17

What's the most efficient way to avoid using require_once (it seems to
be really slow on my machine). A good design is always a good start but
keeping track of every file that needs to include other files, is just
too demanding. I've seen people using c-style harnesses like this:

<?php
if(!defined('_MYCLASS_'))
{
define('_MYCLASS_', 1);
class MyClass { ... }
} //!defined

but 'defined' can be slow too (I'm profiling my application execution
with APD).

How do you avoid re-definition of your classess? require_once, define
harness, own file import hack or what? Thanks.


-veikko

--
veikko
mail@ .com
makinen

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация