Jump to content

Archived

This topic is now archived and is closed to further replies.

bholbrook

PHP Universal Classes

Recommended Posts

Is there a way to make a class universal to every site created on a server?

Example:

I have a DBA that I include into every site, but it'd be nice if it was just included into every site automatically.

Thanks in advance.

Share this post


Link to post
Share on other sites
The only way I can think to to do that would be to write it as a PHP extension dll (or .so for 'nix)

Share this post


Link to post
Share on other sites
Okay, thanks. Not quite what I'm looking for. This needs to be editable by PHP programmers, not C++ programmers (slight difference in salaries  ;) )

I worked on a site that had this ability, all of the classes where in a seperate folder that was available to all sites, and other classes extended them. I know it's possible, but I just dont know how.

Share this post


Link to post
Share on other sites
*** bump ***

Still unsolved, any help would be appreciated.

Barnard, could you post a link to an article re: .so files and such, thanks

Share this post


Link to post
Share on other sites
Thanks Barand

For those interested, we used symblic linking to fic the problem.

Symbolic linking allows us to make one filder on the server for classes and then create SYMBOLIC folders in out sites. In a linux shell type:

ln -s [SOURCE DIRECTORY] [FOLDER NAME] and the folder will be created linking to the source.

Share this post


Link to post
Share on other sites
This could be another (easier?) way

http://www.phpfreaks.com/forums/index.php/topic,109891.msg443969.html#msg443969

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.