Re: dynamically loadable php files
- From: "NC" <nc@xxxxxxxxx>
- Date: 1 Sep 2005 08:51:47 -0700
kishore.sainath@xxxxxxxxx wrote:
>
> I have created a set of classes in PHP for internal use in the company.
>
> Hence I don't explicitly want to "require" or "require_once" them
> whenever required.
>
> I want to make the library loadable on demand just like mysql or other
> libraries in php.
MySQL library usually is NOT loadable "on demand". It is loaded
at the server startup.
> I want people to use the classes in my library without "requiring"
> anything.
Then use the auto_prepend_file directive in php.ini. This way,
PHP will parse your file(s) every time it parses anything, and
your classes will be available to any PHP script on your server
without explicitly incluing/requiring them.
> In a nutshell, I want to make my PHP library a .so file in Linux
> and a .dll file in Windows.
>
> How do I achieve this?
You can't. If you want to use the extension mechanism, you have to
write your extension in C.
Cheers,
NC
.
- References:
- dynamically loadable php files
- From: kishore . sainath
- dynamically loadable php files
- Prev by Date: Re: Splitting a Search into Pages
- Next by Date: OT - attitudes to XHTML and HTML
- Previous by thread: Re: dynamically loadable php files
- Next by thread: Blog Hosting
- Index(es):
Relevant Pages
|
|