PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 27th, 2002, 09:38 PM
Volitics Volitics is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Knoxville, Tennessee (U.S.A.)
Posts: 58 Volitics User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 15 sec
Reputation Power: 8
When Must I Use ".inc" Suffix Instead Of ".php" Suffix?

::Question::

I have been using an "includes" file to include a table into a page. In order to get the "includes" file to work the way I want it to work on my server I must treat the file as if it were a PHP file and use a ".php" suffix instead of an ".inc" suffix. The ".php " suffix seems to work fine.

My question is this: Is there a specific reason why or instance where I must use the ".inc" suffix instead of the ".php" suffix for "includes" files?

Thank you in advance.

Volitics

Reply With Quote
  #2  
Old December 27th, 2002, 10:36 PM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to Lindset Send a message via AIM to Lindset
Hi,

The .inc extension is often used to point out that the file should be included, and not loaded directly.

There's really no good reason to use .inc. You should always end your file names with .php. If you don't use the .php extension, for example apache won't send the file to the php parser, which in return makes it print out the content of the file as clear text (displaying all your source code).

Although it IS possible to make apache treat the .inc files as .php files, it's not standard, and is therefore discouraged.

If you really really really want to use .inc, you could use .inc.php instead..

Hope that answers your question
__________________
Best Regards,
Håvard Lindset

Reply With Quote
  #3  
Old December 29th, 2002, 08:59 AM
Volitics Volitics is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Knoxville, Tennessee (U.S.A.)
Posts: 58 Volitics User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 15 sec
Reputation Power: 8
Thank you for the help.

Mr. Lindset;

Thank you for your kind response.

Regards;

Volitics

Reply With Quote
  #4  
Old December 30th, 2002, 07:33 AM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 8
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
i usually make all my files i need included inside an 'include' directory with a .inc.php extension, my server has no problems interpereting it.

so...

somefile.inc.php works fine
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > When Must I Use ".inc" Suffix Instead Of ".php" Suffix?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 12 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek