473,320 Members | 1,867 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,320 software developers and data experts.

What is extension for include file in php .inc or .php?

Expand|Select|Wrap|Line Numbers
  1. include_once 'examplefile.php';----------> 1
  2. include_once 'examplefile.inc';----------> 2
  3.  
Which one is correct?
Jan 24 '11 #1
3 3317
i dont know
Jan 24 '11 #2
stepterr
157 100+
It depends. Both are fine to use and there are a couple of differences.

Sometimes people will use *.inc and then modify their server configuration so that *.inc files cannot be accessed through the web. But you could accomplish the same thing by just not including those files in your document root. Another reason could depend on how your server is setup. If you are setup to only parse .php files then an .inc could be viewed in its raw form.
Jan 24 '11 #3
Dormilich
8,658 Expert Mod 8TB
in principle, PHP doesn’t care about the file extension. you don’t even need a file extension.
Jan 25 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Nick | last post by:
I have a bunch of includes that are includes of includes included includicly... so they must be linked to the site root. Heres an example... ...
3
by: BlueFrog | last post by:
Hey, Anyone got any ideas why I wouldn't be able to output a value stored in the session array in a particular include file - I am using session_start() but to no avail. Joe
7
by: Vojma | last post by:
I have a problem At my site I have designed a framework with tabs as below (tabs_1.asp) +----+ +------+ +-------+ | MC | | Cars | | Boats | + +------------------------- then, into...
2
by: Vilmar Brazăo de Oliveira | last post by:
Hi, How verify type or extension of file using ASPUPLOAD? I check documentation, but I didn't find anything else yet. thanks, -- ««««««««»»»»»»»»»»»»»» Vlmar Brazăo de Oliveira...
9
by: JR | last post by:
Hi, I'm migrating my website to an IIS 6.0 server and all the asp pages work fine except for the ones that reference include files, even though I have "Enable parent paths" enabled in the...
1
by: bk0612 | last post by:
How do I call the include file in a .aspx page? Thanks
11
by: JH | last post by:
I'm new in the .NET world, so sorry if this is a faq. In classic ASP I often use a include file with some standard functions, ex. formating a string an so. How do a do this i .NET ?? In my test...
3
by: Rick | last post by:
Is it possible to include a file from another server in html? I have typed <!-- #include file="http://Nlg-info/PESE/PESE.asp" --> is this the correct code? I cannot have the files together as...
1
by: Joe | last post by:
Hi, I haven’t mastered the asp.net yet to be able to use asp.net 2.0 master pages. So I am planning to create pages with .aspx extension and once I am confident, I will rewrite them using...
19
by: SteveT | last post by:
Is it possible to have an include file that resides outside of the web site parent folder? For instance, lets say you have several websites under Inetpub/global/websites/ but the include file is...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.