Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-07-2007, 07:34 AM   PM User | #1
jream
New Coder

 
Join Date: Sep 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
jream is an unknown quantity at this point
.dat and .txt files

Is there any difference when including a .dat or .txt file?
I havent seen any difference with its effectiveness, both can store content and print, besides .dat looks like a cooler extention to organize files - is there any gain?
jream is offline   Reply With Quote
Old 06-07-2007, 01:20 PM   PM User | #2
smalldog
Regular Coder

 
Join Date: May 2007
Posts: 118
Thanks: 0
Thanked 0 Times in 0 Posts
smalldog is an unknown quantity at this point
In fact the .dat file can be just .txt file with .dat extension but originally text files .txt consist of lines terminated with a CR/LF (#13#10) combination (or just LF Unix/Linux or CR Mac), and typed files .dat consist of data taken from a particular type of data structure.
__________________
Forum for webmasters and developers
http://www.htmlfrenzy.com
Are you an IT expert? Join our Reward system
www.htmlfrenzy.com/reward-system.php
smalldog is offline   Reply With Quote
Old 06-07-2007, 09:14 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,452
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
A .dat file can contain ANYTHING depending on which program it is intended to be used with. In most cases it will not contain readable text or if it does there will usually be non readable portions as well.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 06-07-2007, 09:37 PM   PM User | #4
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,712
Thanks: 2
Thanked 251 Times in 243 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
Even though you posted this in the HTML forum section, I assume that you are talking about using PHP to include these?

A word of caution about putting PHP code (including PHP variable and constant define(...) statements) in files that do not have a .php extension. If you put PHP code/variable/define statements in files that have a .htm, .html, .txt, .dat, .inc, ... or any other extension that is not parsed by the PHP language engine, then anyone that learns or guesses the file name can directly browse (or use a script) to your file and see the exact contents of that file. Only put PHP code/variable/define statements in a .php file (or an alternate extension that you have setup on your server to be parsed as PHP code.)
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:19 AM.


Advertisement
Log in to turn off these ads.