Creating and using self made php libraries
Posted: Tue Apr 29, 2008 9:46 am
Hi, I'm new here.
I used to use another forum, but it's down now, I hope you'll help a newbie with this.
I own a few domains. As a C++ programmer, I thought about creating a "common" library of functions, classes etc. Without copying it everywhere I need it, but rather referencing to it (including it).
And here is my concept: To put the library (php files) on one server (domain) and use them everywhere I want. Instead of giving them a .php extension (which won't work) I would use a "inc" or "include_me" or whatever extension. Then I'll use the include function on another domain/server to get it. I tried that and it works.
The question is - is there something I'm missing? Is there any danger ? Do you do that? I'm asking because I've read a biiiig and boring book about php and this "make my life easier" idea wasn't mentioned.
p.s. sorry for my English.
I used to use another forum, but it's down now, I hope you'll help a newbie with this.
I own a few domains. As a C++ programmer, I thought about creating a "common" library of functions, classes etc. Without copying it everywhere I need it, but rather referencing to it (including it).
And here is my concept: To put the library (php files) on one server (domain) and use them everywhere I want. Instead of giving them a .php extension (which won't work) I would use a "inc" or "include_me" or whatever extension. Then I'll use the include function on another domain/server to get it. I tried that and it works.
The question is - is there something I'm missing? Is there any danger ? Do you do that? I'm asking because I've read a biiiig and boring book about php and this "make my life easier" idea wasn't mentioned.
p.s. sorry for my English.