Library Packaging
I've been developing a library to support one of my projects. And although I didn't intend for this library to be distributed, it's gotten so large that I began to think, "Why not?"
But there's a problem. I really don't know how to package library in a way that would be easily installed on a different webserver. Mostly, this has to do with where and how all these different library files refer to one another. Here's an example path:
Right now I have to use full paths for situations like above. This makes it difficult to transport to another server because my site root is "/home/deninet/". (I have no option to change this or PHP.ini, since I rent the server.) It's also a bit of an annoyence, since as you can see, the paths can get quite long.
Any suggestions of how to solve the above problem, and how to better package my library for distribution?
But there's a problem. I really don't know how to package library in a way that would be easily installed on a different webserver. Mostly, this has to do with where and how all these different library files refer to one another. Here's an example path:
- [site root]
- public_html
- includes
- util
- table
- sort
- SortTableByColumn.php
- join
- operator
- AbstractUniaryTableOperator.php
- iterator
- error
- sort
- includes
- public_html
require_once("../operator/AbstractUniary TableOperator.php");The server dies on execution, claiming it can't find the file. Mind you, it's not SortTableByColumn that's being executed directly, it is being included by another file elsewhere in public_html. According to my understanding of how PHP includes files, the above line should work perfectly fine. Since SortTableByColumn becomes the "current working script", a relative path should work fine, shouldn't it?Right now I have to use full paths for situations like above. This makes it difficult to transport to another server because my site root is "/home/deninet/". (I have no option to change this or PHP.ini, since I rent the server.) It's also a bit of an annoyence, since as you can see, the paths can get quite long.
Any suggestions of how to solve the above problem, and how to better package my library for distribution?
