IIS: How can many websites have the same code/class?
Lets say I run IIS with 100 websites on it, all 100 websites need a single class. Instead of copying/pasting 100 times, is there a better way?
I cannot create another "site" with only the class because that site will recognize "include" as a regular HTTP request the handler will pass it to PHP to "run it". Even if I remove the handler for only that site, then any user inside out network would be able to pull up the PHP...
edit: Maybe if there are no solutions to this, I can do a work around: Configure IIS to treat PHP code as regular text. Then whenver a website request it, it will simple return the PHP code. Then I can block ports so nobody can access it but the server itself... The problem with this workaround: I do not know how to tell IIS to just send out the PHP code.
edit2: Well I renamed it to textfiles for now. So this workaround is working... But I am looking for a real solution to this problem.
Last edited by ZeratulsDomain; 02-12-2011 at 08:54 AM.
I honestly cant be the first person to ever want to do this...
So, in c:\php\includes\ you might have sharedclass1.php, sharedclass2.php, etc.
And then, on your sites you might have the following:
The shared classes (libraries (includes (files) ) ) in this case don't really belong to any site. But, any site can include them.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)