473,320 Members | 2,180 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.

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 2409

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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.