473,734 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is .inc file in php

hello

vishal here.

i have seen some scripts which includes file like
include('time.i nc')

so can anyone tell me what this file contain. and what is extension
meaning. pls provide me also some link to this help if possible

thxs in advance.

Jul 17 '05 #1
5 9688
inc files are "include" files, they can contain functions, classes or
routines that you write. something like "time.inc" would more then likely
have a function that generated the time and or date to display on a page.
inc files are also used in JaveScript as well.

Jul 17 '05 #2
behindspace wrote:
inc files are "include" files, they can contain functions, classes or
routines that you write. something like "time.inc" would more then likely
have a function that generated the time and or date to display on a page.
inc files are also used in JaveScript as well.


Always place 'include-files' outside the documentroot of the webserver,
since they're not supposed to be invoked directly by a user altering his
URL.

In case you can't place files for inclusing outside the docroot, in most
situations it's better to use '.php' or '.inc.php' and make sure there's
nothing harmfull happening when you try to view them or make really sure
make sure the webserver doesn't show .inc files...

It's a common mistake to put passwords etc. in a funtion e.g. for
database access and when that's an .inc file and it doesn't get parsed
through php but the source is sent to the user plain text... u c

Hans

--
"He who asks a question is a fool for five minutes;
he who does not ask a question remains a fool forever"
Jul 17 '05 #3
.oO(vishal)
i have seen some scripts which includes file like

include('time. inc')

so can anyone tell me what this file contain.
HTML or PHP code to include into the current script.
and what is extension
meaning.


'inc' means 'include', but you can use any name you like. PHP doesn't
care about the extension of an included file. Use what makes sense.

Micha
Jul 17 '05 #4
It's a common mistake to put passwords etc. in a funtion e.g. for
database access and when that's an .inc file and it doesn't get parsed
through php but the source is sent to the user plain text... u c

this is very true, I'm sorry I fogot to mention that before.

Jul 17 '05 #5
behindspace wrote:
It's a common mistake to put passwords etc. in a funtion e.g. for
database access and when that's an .inc file and it doesn't get parsed
through php but the source is sent to the user plain text... u c

this is very true, I'm sorry I fogot to mention that before.

Too true. My local council does excactly that on their website. I've
emailed the cretins and told them that their database login information
is visible to anyone who uses any browsers "view source" option. They
claim it isn't a security issue 'cos that database user ONLY has
insert,update and delete permissions on the database. What can you do -
if you pay peanuts then you employ monkeys !
Jul 17 '05 #6

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

Similar topics

3
13388
by: Karen Grube | last post by:
Hi! Each week, we receive a two-page PDF file from UPS along with a separate flat file (a CSV) The PDF file contains the overview of our weekly invoice and the CSV contains the details of each shipment. I download the file from UPS and then use DTS to import the data into SQL. At that point, I have a Crystal report that prints what looks like a regular UPS invoice. The only problem is that I wind up with having to print two...
14
2220
by: Frances Del Rio | last post by:
if (parent.frames.main.location == 'mediaselect.html') { I have a very simple frameset, name of frame where I'm checking is 'main'... why is this not working? I mean this is correct syntax, right?? I also put a test alert, but alert does not come up if file I'm testing for is loaded in 'main' frame.. thank you.. Frances
2
1369
by: jun_qu | last post by:
I have compile my first C# to exe. My question is what library file else need to run this exe at a compute without installed C#. Thanks
1
1519
by: jun qu | last post by:
I just make my first C# test application, my question is what file such as DLL need along with this exe, when install exe at another computer. Thanks
9
19169
by: Quiver | last post by:
Is there a way to have the user choose what file to import, but set everything else up in VBA? The command button that would start the import would have something like this -- DoCmd.TransferSpreadsheet acImport,acSpreadsheetTypeExcel9, "tblMAIN",???,True -- with the ??? indicating where you would typically put the path and name of the spreadsheet. However, the spreadsheet that will be imported will have a variable name including the...
1
2642
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there any other changes that restart the application? Will modify a code-behind .cs/.vb which calls a class in the App_Code folder restart the application?
1
1249
by: StephenW | last post by:
The .NET framework support no sounds at this time, so have to use the API method PlaySound located in winmm.dll. To do this, have included a method from the winmm dll. using System.Runtime.InteropServices; private static extern bool PlaySound( string lpszName, int hModule, int dwFlags ); The PlaySound Function requires a full file path as well as name of file (e.g, c:\\ Projects\\Words\\Words\\Sounds\\wordsound.wav" ) however as...
11
1301
by: Academia | last post by:
I believe that with VS2005 if I don't include sub New it is somehow added but not visible. But if I need a New with arguments or if I have to insert code into New I can write my own. Should it be put into the .designer.vb or into the .vb file? If you recommend putting it into the .vb file should it be:
0
1428
by: sweavo | last post by:
Hi all, (Python 2.5 under cygwin) I'm reading a bunch of XML files and merging them in memory - each file contains a number of packages which are to be merged: for fname in gInfiles: doc=xml.dom.minidom.parse(fname) if gDoc is None:
36
5397
by: Don | last post by:
I wrote an app that alerts a user who attempts to open a file that the file is currently in use. It works fine except when the file is opened by Notepad. If a text file is opened, most computers are configured to use Notepad to open the file by default and if they are configured to use Notepad by default I want it to remain that way rather than retrieve the text into my app or force the user to use another app to read the file. I'm...
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.