Reply to classes and require ?

Your name:

Reply:


Posted by avlee on 03/12/07 09:50

Hello

I have a big class in one php file.
I would like to divide it to many smaller files. But when i try:

<?php

class IndexController extends Zend_Controller_Action
{
require_once('IndexController_common.php');
require_once('IndexController_client_car.php');

i receive parse error:
"Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting
T_FUNCTION in
/mnt/hda5/www/zend/dg/car/application/controllers/IndexController.php on
line 6"

When i move require_once outside class definition everything works fine.
But i need require inside
of class because in thouse files are functions which are the member of
that class.
How can i do it ?

Thanx

[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

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