Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems Using .inc files

Status
Not open for further replies.

pwel

Programmer
Aug 18, 1999
79
GB
Can anyone help me with the following problem?<br><br>I have used Notepad to write .inc files to include in my ASP files. I have saved the file as myFile.inc from Notepad, but when I test the ASP file I keep getting the error: -<br><br>&quot;The include file 'myFile.inc' was not found&quot;<br><br>even though it is in the same directory!<br><br>Any ideas?
 
Are you putting:<br><br>&lt;!-- #include file = &quot;myFile.inc&quot; --&gt;<br><br>on top of all your ASP pages. It would go after the &lt;%@LANGUAGE=VBSCRIPT%&gt; line.
 
Dear pwel,<br><br>As LuvASP points out, you should show us your include directive in your post. Without seeing it all we can do is make guesses that may not have anything to do do with your problem.<br><br>-pete
 
THis problem also comes if you use <i>include virtual = xx.inc</i> <br><br>so you have to use <br><b>include file = xx.inc</b><br><br><A HREF="mailto:webmaster@tripmedia.com">webmaster@tripmedia.com</A><br> <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
Try to find where your file is located.<br>Had faced the same problem and did 2 things<br><br>1) Located the folder where the file is.<br>2) Gave full path with file name.<br><br>Regards,<br><br>ALad
 
Hi there people,<br><br>The problem was not the include directive but the .inc file itself. As I was using Notepad to write them, unbeknown to me Notepad was adding.txt to the end of the file, i.e. myIncFile.inc.txt and that is why the asp file couldn't find them.<br><br>To resolve this problem in Notepad i had to enclose the file name in double quotes i.e. &quot;myIncFile.inc&quot;, and that was it, problem solved.<br><br>Thanks everyone that contributed, your help and knowledge is much appreciated.<br><br>Paul Welding.
 
FYI, when you save files in Notepad,&nbsp;&nbsp;to avoid having the .txt extension added,&nbsp;&nbsp;enclose the file name in quotes. Your supplied extension will be preserved.<br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Or, to add to that, choose All File (*.*) as File Types and the name won't be appended with .txt<br>N++ RULES!!! <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top