Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2004, 03:27 PM
WebProWorld Pro
 

Join Date: Jan 2004
Location: Empangeni, South Africa
Posts: 124
justinw RepRank 0
Default What do you use for PHP includes?

I was wondering, with PHP includes, what type of file do you include? Does it matter?

My files that contain the HTML is .inc

You?
__________________
Website designs in Empangeni, South Africa: www.jwdesigns.co.za
Reply With Quote
  #2 (permalink)  
Old 07-15-2004, 04:59 PM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

It doesn't matter. Just keep in mind that any other extension than PHP will be served as plain text if someone ever felt like calling it directly. So whenever I'm inclined to call something .inc I usually go .inc.php, just in case I ever forget myself and actually throw a database password in there or something.
Reply With Quote
  #3 (permalink)  
Old 07-15-2004, 10:25 PM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

I always keep my passwords in a seperate file anyway.
Reply With Quote
  #4 (permalink)  
Old 07-15-2004, 10:26 PM
WebProWorld Member
 

Join Date: Jul 2004
Location: ---| here |---
Posts: 85
vivekar RepRank 0
Default php practice

Good programming practice is to use
.php extension

.inc, .txt extensions can be vulnerable.
If you happen to store database passwords or other secure details in your inclusion files (with .inc, .txt extensions), you are just inviting trouble.

Since .php files are parsed and interpreted by the server, even if the file is accessed directly, your contents are safe.
__________________
Submit URL - Website Directory Web TemplatesWeb hosting firms list
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0