You are here: Re: Accessing Class Method « PHP Programming Language « IT news, forums, messages
Re: Accessing Class Method

Posted by Jerry Stuckle on 09/18/07 16:01

NoDude wrote:
> Ahem... I have a feeling I'll get shot, stabbed and hung for this,
> buuuuuut... There's really no need for require_once in __autoload,
> because if you've reached the __autoload function, the class is
> obviously not present (no sense making php check for it a second
> time). Also, if you're including from the same directory, use './'.
> $class_name.'.php', that way php won't look in the includes paths.
>

No, you're correct, there's no reason to use require_once if you use
autoload.

OTOH, while require_once means you need to add another statement to your
code, the execution is faster. And it will work on any system - i.e. a
shared host with autoload disabled.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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