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

Advantages or disadvantages of .inc files


What are the advantages or disadvantages of .inc files over the
'include' statement. I can't seem to find that information at the PHP
website.

Also the same for form building inline, I guess you would call it, and
HTML template objects. File types of .tpl and .ihtml?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jul 15 '06 #1
4 2411

IchBin wrote:
What are the advantages or disadvantages of .inc files over the
'include' statement. I can't seem to find that information at the PHP
website.

Also the same for form building inline, I guess you would call it, and
HTML template objects. File types of .tpl and .ihtml?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
To answer your first question:
if *.inc files were called directly via the browser's url, most likely
it's content would be displayed unparsed. So your entire code would be
naked on the internet, including possible passwords etc.)

Instead if you want to use '.inc', you could use file.inc.php, which
would be parsed before outputted to the browser.

Frizzle.

Jul 15 '06 #2
frizzle wrote:
IchBin wrote:
>What are the advantages or disadvantages of .inc files over the
'include' statement. I can't seem to find that information at the PHP
website.

Also the same for form building inline, I guess you would call it, and
HTML template objects. File types of .tpl and .ihtml?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
_________________________________________________ _________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

To answer your first question:
if *.inc files were called directly via the browser's url, most likely
it's content would be displayed unparsed. So your entire code would be
naked on the internet, including possible passwords etc.)

Instead if you want to use '.inc', you could use file.inc.php, which
would be parsed before outputted to the browser.

Frizzle.

Or include the following in your .htaccess file:

<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>
Jul 16 '06 #3
The only "advantage" for using different extensions is that each extension
helps identify the contents of each file. I use .php for scripts which can
be executed, and .inc for scripts which must be included instead of
executed. I presume Smarty use .tpl to identify its template files. It is
just a matter of convention.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org

"IchBin" <we******@ptd.netwrote in message
news:Gw********************@ptd.net...
>
What are the advantages or disadvantages of .inc files over the 'include'
statement. I can't seem to find that information at the PHP website.

Also the same for form building inline, I guess you would call it, and
HTML template objects. File types of .tpl and .ihtml?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

Jul 16 '06 #4

"Juliette" <jr*********@jokeaday.netwrote in message
news:44***********************@news.wanadoo.nl...
frizzle wrote:
>IchBin wrote:
>>What are the advantages or disadvantages of .inc files over the
'include' statement. I can't seem to find that information at the PHP
website.

Also the same for form building inline, I guess you would call it, and
HTML template objects. File types of .tpl and .ihtml?

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
________________________________________________ __________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

To answer your first question:
if *.inc files were called directly via the browser's url, most likely
it's content would be displayed unparsed. So your entire code would be
naked on the internet, including possible passwords etc.)

Instead if you want to use '.inc', you could use file.inc.php, which
would be parsed before outputted to the browser.

Frizzle.


Or include the following in your .htaccess file:

<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>
You can also put .inc files in a directory which is outside the web root, or
in a password-protected directory so that its contents cannot be accessed
through the web server.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org

Jul 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: jj | last post by:
Care to enlight? Thanks!
1
by: Husam | last post by:
Hi EveryBody: I have research about advantages and disadvantages of C++ languages In one of my programming courses. Can Any one help me and told me about advantages and disadvantages of C++...
1
by: vumani | last post by:
what is the advantages and disadvantages of Ms SQL server and java servletts front-end on the clien end. what is the advantages and disadvantages of Ms Access on the server, connected via JDBC and...
1
by: vibee | last post by:
what are the advantages and disadvantages of normalization, and if i alread have a single talbe with a single form, is it too late to normalize thanks
8
hsn
by: hsn | last post by:
i would like to know what are the security advantages and disadvantages in HTML thank you
1
by: bantunks | last post by:
Hello, I am trying to figure out the advantages and disadvantages of exposing interfaces through Opaque data types in C. I have figured/found out the following two advantages 1. Higher level of...
3
by: Damodhar | last post by:
what is the advantages and disadvantages for register_globals = on
21
by: Jonathan Sachs | last post by:
I'm a programmer learning PHP. I'm looking for some input on its strong and weak points compared to other server-side programming environments, e.g., Java Server Pages. Please note, this is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.