By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Difference between include and require

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.