0

I have 106 PHP files present in folder. This folder is included (copied the folder in application folder) in all the web-application, which I have develop but the problem is, if I implement any change in code than I have to replicate that change in all the applications.

Is there any way through which I can share this folder in all web-application or domains which are hosted on same server?

I have tried using outside htdocs folder but things does not worked as I thought. Kindly Guide.

Jared Farrish
  • 48,585
  • 17
  • 95
  • 104
  • 1
    "I have tried using outside htdocs folder but things does not worked as I thought." This should've worked, elaborate on this part. Where did you put the shared files? How'd you include them in your applications? What do you mean by "things didn't work as I thought?" What error messages if any did you get? – millimoose Aug 25 '12 at 14:53

1 Answers1

0

Yes you can (assumed you have an linux server), if your domains are stored within the same server you can place your php files outside the html of one of them and then use something like this

include ("/home/user/domain/folder/file.php");

to include your php into another one

example

mydomainhost.com has the folder php with the 106 files

in your testdomain.com you include

include ("/home/user/mydomainhost.com/php/file.php");

user = your webserver account name

hope this helps you

Pluda
  • 1,479
  • 6
  • 21
  • 45