bholbrook Posted September 14, 2006 Share Posted September 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 14, 2006 Share Posted September 14, 2006 The only way I can think to to do that would be to write it as a PHP extension dll (or .so for 'nix) Quote Link to comment Share on other sites More sharing options...
bholbrook Posted September 14, 2006 Author Share Posted September 14, 2006 What lanuage is a .so file written in, C?I'm unfamiliar with the actual PHP program.I'm on a 'nix server. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 14, 2006 Share Posted September 14, 2006 As its OOP, C++ would be a good choice Quote Link to comment Share on other sites More sharing options...
bholbrook Posted September 14, 2006 Author Share Posted September 14, 2006 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. Quote Link to comment Share on other sites More sharing options...
bholbrook Posted September 15, 2006 Author Share Posted September 15, 2006 *** bump ***Still unsolved, any help would be appreciated.Barnard, could you post a link to an article re: .so files and such, thanks Quote Link to comment Share on other sites More sharing options...
Barand Posted September 15, 2006 Share Posted September 15, 2006 http://www.zend.com/php/internals/extension-writing1.php Quote Link to comment Share on other sites More sharing options...
bholbrook Posted September 29, 2006 Author Share Posted September 29, 2006 Thanks BarandFor 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. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 30, 2006 Share Posted September 30, 2006 This could be another (easier?) wayhttp://www.phpfreaks.com/forums/index.php/topic,109891.msg443969.html#msg443969 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.