473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

require();

Is there a specific reason why you would NOT put all your require statements
in one php file and then simply call that file instead of perhaps 3 or more
files directly?

If it is named as a PHP file then you should have no security problems since
you can't view the source.

Got a lot of PHP books and can't remember seeing it done so I am assuming
there is a good reason?

Cheers

Phil
Nov 8 '06 #1
1 1073
On Wed, 08 Nov 2006 18:19:37 +0000, Phil Latio wrote:
Is there a specific reason why you would NOT put all your require statements
in one php file and then simply call that file instead of perhaps 3 or more
files directly?
Performance. Why would you want to load code you're not going to use.
Nov 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Zaan | last post by:
www.entropy.ch release for Mac OS X.] Hello, My issue is the following: to promote consistency on a site I'm building, I decided to go for a php scheme where some recurring elements...
5
by: Phil Powell | last post by:
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure...
4
by: Mxsmanic | last post by:
The require() I'm using in a PHP script has stopped working after I moved from PHP4 and Apache 1.3.x to PHP5 and Apache 2.x. Now I get messages like this: Warning:...
9
by: Andy Jacobs | last post by:
Hi All I've tried as many combinations as I can think of but I'm not getting any where. This is what I have: <? $menu = 'menus/' . $HTTP_GET_VARS . '.inc'; echo $menu; ?>
4
by: erin g | last post by:
What is the difference between REQUIRE and INCLUDE and in what circumstances should one be used over the other?
4
by: Patrick LeBoutillier | last post by:
Hi all, Is there anyway to be notified when the use/require of a module fails? Basically I would like to setup a sub that gets called whenever a use/require call doesn't find what it is...
15
by: Michael | last post by:
Guten Morgen, I am implementing a script that my client wants on their website. Within the script there are several "require" statements. Any time one of these "require" statements is...
5
by: Jim Carlock | last post by:
I've set up the following using an Alias in Apache... Alias /phpdocs/ "C:/Apache/htdocs/common/docs/php/" <Directory "C:/Apache/htdocs/common/docs/php"> Options Indexes FollowSymlinks MultiViews...
7
by: Bunty | last post by:
When we want to call another file at that time we can use both include and require.Please tell me what's the difference between them?
9
by: nirmal1349 | last post by:
Hi, I want to know how can we limit the scope of require function in perl file. I have a perl file and it's importing another file in it using require like this: # main file is ABC.pl require...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.