Share Code between multiple PHP sites

Kruk

New Member
Good evening. I found a few questions that seemed to ask the same thing I am asking, but none of the answers seems to work for me. Basically, I have a few generic PHP files (mostly classes, but some are not) that I want to be usuable by multiple PHP sites. Here is an example of my folder structure:Site A RootC:\Personal\WebSites\SiteASite B RootC:\Personal\WebSites\SiteBShared CodeC:\Personal\WebSites\SharedFrom Site A I tried using include("../Shared/foo.php") to reach the files, but this did not work. I have a feeling this is due to the folder being beyond the site root folder of SiteA. Is there a way to simply include files from the Shared directory? I can't imagine this is an uncommon practice, but I just can't figure it out.BTW, I am using PHP 5.2.14 through IIS (via FastCGI) on Windows 7 if that matters. Eventually, I will be moving these sites to Linux/Apache hosting, so I would prefer any solution to work with either.Thanks!!
 
Back
Top