473,401 Members | 2,068 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,401 software developers and data experts.

Difference between include and require

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?
Sep 4 '08 #1
7 1940
Bunty wrote:
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?
You may want to try this obscure site, it has some great references on
this subject of PHP.

http://www.php.net/manual/en/function.include.php

Good Luck

Scotty
Sep 4 '08 #2
On Thu, 04 Sep 2008 05:21:16 -0700, Bunty wrote:
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?
You can find the manual here: http://www.php.net/manual/en/
The page on require(): http://www.php.net/manual/en/function.require.php

It says:
"require() and include() are identical in every way except how they
handle failure. They both produce a Warning, but require() results in a
Fatal Error. In other words, don't hesitate to use require() if you want
a missing file to halt processing of the page. include() does not behave
this way, the script will continue regardless. Be sure to have an
appropriate include_path setting as well."
Sep 4 '08 #3
Bunty wrote:
> 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?

You may want to try this obscure site, it has some great references on
this subject of PHP.

http://www.php.net/manual/en/function.include.php

Good Luck

Scotty
lol! Yeah, about as obscure as the nose on my face! Just couldn't
resist, could ya? <g Hmm, guess it might be obscure to a newbie; I
hadn't heard of it at one time either. Oh well ...

Twayne
Sep 4 '08 #4
Bunty wrote:
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?
Keep this in your memory banks, it comes in handy:

http://php.net/something_I_want_to_know_about_php

You can use function names, construct names, keywords, paradigms, etc.

http://php.net/require
http://php.net/include
Sep 5 '08 #5
Curtis wrote:
Bunty wrote:
> 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?

Keep this in your memory banks, it comes in handy:

http://php.net/something_I_want_to_know_about_php

You can use function names, construct names, keywords, paradigms, etc.

http://php.net/require
http://php.net/include
'http://php.net/something_I_want_to_know_about_php'
And you talk about me??? hehehe

Scotty
Sep 5 '08 #6
FutureShock wrote:
Curtis wrote:
>Bunty wrote:
>> 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?

Keep this in your memory banks, it comes in handy:

http://php.net/something_I_want_to_know_about_php

You can use function names, construct names, keywords, paradigms, etc.

http://php.net/require
http://php.net/include

'http://php.net/something_I_want_to_know_about_php'
And you talk about me??? hehehe
Do I? I don't remember interacting with you directly. Sorry if I'm
missing something obvious, it's a bit late.

--
Curtis
Sep 5 '08 #7
Curtis wrote:
FutureShock wrote:
>Curtis wrote:
>>Bunty wrote:
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?

Keep this in your memory banks, it comes in handy:

http://php.net/something_I_want_to_know_about_php

You can use function names, construct names, keywords, paradigms, etc.

http://php.net/require
http://php.net/include

'http://php.net/something_I_want_to_know_about_php'
And you talk about me??? hehehe

Do I? I don't remember interacting with you directly. Sorry if I'm
missing something obvious, it's a bit late.

--
Curtis
Woops my fault. For some reason I thought you where Twayne.

But you still had an amusing reply.

Peace Out
Scotty
Sep 5 '08 #8

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

Similar topics

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: Nimmi Srivastav | last post by:
Once and for all can someone kindly tell me the difference between C and C++ linkage. I thought I understood it till someone showed me the other day that C functions, that would ordinarily require...
22
by: Weston C | last post by:
I know of course that you can use <script src=""></script> in an HTML document to include javascript code you don't want to spill all over the page. I'm wondering if there's a way to include...
83
by: rahul8143 | last post by:
hello, what is difference between sizeof("abcd") and strlen("abcd")? why both functions gives different output when applied to same string "abcd". I tried following example for that. #include...
3
by: Xiaoshen Li | last post by:
Dear All, I saw some people using #include <string.h> some people using #include <cstring> What is the difference between the two? I can find the file string.h at /usr/include. I don't...
3
by: artifact.one | last post by:
Hi. What's the practical difference between: #include <header.h> and: #include "header.h"
2
by: alex | last post by:
my html page like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
10
by: SoulIntruder | last post by:
Hello folks. I have a beginners question. I have such script: <?php $User = $_POST; $Password = $_POST; $Database = $_POST;
3
by: Bunty | last post by:
When we want to call another file in the existing file at that time we can use include and require both.Please tell me what's the difference between them?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.