FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » require/include a file inside a function
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: require/include a file inside a function [message #172538 is a reply to message #172518] Mon, 21 February 2011 17:34 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/21/2011 10:02 AM, Simon wrote:
>>
>> No, files included in a function are NEVER accessible globally. They are
>> only available in the function - it's part of what functions do.
>
> Yes this is what I thought would happen, (as per my original post), but
> the reply from Paul gave the impression that maybe I was wrong.
>
> auoload is probably best for what I am trying to do, it will globally
> include files needed, when they are needed.
>
> I just need to come up with a 'nice' naming convention of some sort to
> make sure I don't get myself in a mess over time.
>
> Simon
>

I just use appropriate naming conventions and require_once() the files
as I need them. That way I KNOW what I'm getting. That's not always
true with autoload.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Proxy to open blocked sites
Next Topic: problem with web service
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 20:11:42 GMT 2024

Total time taken to generate the page: 0.07453 seconds