Based on the previous questions you asked, I think your catalogs are something problematic for you. here is a functional and safe example or directory organization for the Zend Framework (partial)
var/ www/ vhosts/ otherproject/ project/ src/ <-- maybe some project src can be here and not in your libraries htdocs/ <--- real apache document root css/ js/ var/ log/ sessions/ etc/ doc/ libraries/ Zend/ my-lib/ js/
So apache documentRoot - / var / www / project / htdocs . Here we can find the index.php file, the only php file available for sharing.
In htdocs / js and htdocs / css you can put some of your js and css project files. And then you had a problem with the css and js files of your external php libraries, which are now completely outside the web root.
What I usually do, like others, said here are links from external directories to the js directory inside the root of the website. But, to be more precise, what you should do there is well organized:
ln -s /var/www/project/libraries/my-lib/js /var/www/project/htdocs/js/my-lib ln -s /var/www/project/libraries/my-lib/css /var/www/project/htdocs/css/my-lib
And you should do this for all external libraries that have files that should be in the root directory of the document. Thus, the base url for js files my-lib is / js / my-lib /.
Do not be afraid to use symbolic links (connections in windows), you can even store them in a subversion repository. Just make sure your apache configuration allows you to use symbolic links (Options + FollowSymlinks)
source share