Re: errors when included functions call functions

From: Date: Sun, 04 Feb 2001 03:03:54 +0000
Subject: Re: errors when included functions call functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38057@lists.php.net to get a copy of this message
> Can someone explain to me why this does not work... > > All pages on my site <?require?> header and footer files... > the header file calls an <?include?> to config.inc and functions.inc > > I have a function to connect to the db in functions.inc, that many other > functions and includes use. > > All works fine.... > > but, I have a login page similar to all other pages with <?require?> calls.. > this page is entirely written from a function... > Now, calls to functions from .inc files included in the login page (with me > so far) do not work... > My connect function will not connect... > > writing this out I realize that it is seems quite complex, but my question > is... > can I not call functions from scripts that are included in a page that is > itself written out from a function? You mean?... Your PHP writes out PHP, and you want that PHP to be evaluated? You would need to not write it out and use http://php.net/eval instead. It might be easier to just redesign your functions a little bit though... Calling eval() to do include() sounds like you just didn't plan things quite right for the way PHP works... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#38057) next »