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. Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/ 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) Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92021 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. Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92025 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 Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92026 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. Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92027 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 Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92550 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 Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-92631 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. Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-101131 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 Link to comment https://forums.phpfreaks.com/topic/20788-php-universal-classes/#findComment-101526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.