/    Sign up×
Community /Pin to ProfileBookmark

sharing PHP files across multiple Web sites

Hello

I would like to support multiple Web sites using the same PHP files.
I have two options here:
1) Duplicate the PHP files for each Web site
2) Share a single copy of the PHP files for all Web sites

Is one option preferable to the other? Will I have performance problems if the files are shared?
What should be my considerations when choosing which option to take?

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@BigjohnMar 03.2004 — [i]Originally posted by pytho [/i]

[B]Hello



I would like to support multiple Web sites using the same PHP files.

I have two options here:

1) Duplicate the PHP files for each Web site

2) Share a single copy of the PHP files for all Web sites



Is one option preferable to the other? Will I have performance problems if the files are shared?

What should be my considerations when choosing which option to take? [/B]
[/QUOTE]


Not sure how you would configure things to SHARE the files.

Seems to me that it would be much easier to just duplicate the files, changing the things that need to be 'unique' for each site.

John
Copy linkTweet thisAlerts:
@pythoauthorMar 03.2004 — but that would mean that everytime I want to make a change to a page I will have to re-duplicate it.

isn't there a simpler way?
Copy linkTweet thisAlerts:
@BigjohnMar 03.2004 — Well, you could put your content into mySQL database/tables. I have 2 websites referring to the same Database. THen you just change the content in the DB and it's changed on both sites.

The problem I see with 'sharing' files is that websites are isolated from eachother on a server for a reason-security.

Now, if what you're trying to do is run multiple DOMAIN NAMES, i can do that with my hosting plans... For example: www.name1.com, www.name1.net, www.name1.org can all be stacked ontop of eachother.

John
×

Success!

Help @pytho spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...