Including A ".inc" File Versus An ".asp" Or ".htm" File
I have begun having problems with an entire site that has been using an include file called header.inc The file simply has some html for a nav table.
I had had everything under the root web using this, then I created a directory and had a file in that directory use header.inc This is where my problems began.
I went into the inlude file and changed all the paths to read "http://www.somewebsite.com/default.asp", etc. Is this right? When using an include in this context, what extension on the file is important, and what is the proper way to include the file...
View Replies
ADVERTISEMENT
Okay, I'm doing a project for someone in which random questions are to be pulled and posted so that the user can complete a test/quiz/exam for a grade.
Well, his host apparently doesn't have any database stuff, but I can probably get him to move to another if it's absolutely necessary.
Personally, I'd prefer to stick with files, just because that's what I'm most accustomed with. But if there's a very compelling reason (performance or reliability?) to move to a database, I suppose I could.
Here's a sample of the type of data I'll be using. The format is as follows: Question, Correct Answer, First Answer, Second Answer, Third Answer (If Any), Fourth Answer (If Any). A question is on each line (in this browser window, it may appear that a question is spanning several lines, but it truly isn't). Code:
View Replies
View Related
I am trying to include a file in an ASP page. But the problem is that the file is in a different folder. When i put the file in the same folder then it works fine. Is there any way to include a file from different folder. For Example I am using a file for database connection and including it in each ASP page as follows--
<!--#include file="Connection.asp"-->
So i have to put this file in each folder of my web application. But i want to keep it only at one place.
I have also done it with ../ and /(root) but both the methods are not working. These methods work properly on localhost but not on the hosted website
View Replies
View Related
how can we include one vbs file into other vbs file?
View Replies
View Related
How would I go about including a .txt file in an If-Then statement? Basically what I want is to have a certain file included depending on what the value of Request.QueryString("type") is equal to. Any ideas?
View Replies
View Related
I wanna just include a .php in a .asp page,I mean,I use PHP Code:
<?php
include('etn.php');
?>
to include and execute the etn.php in test.php file, but now I need only to include etn.php in .asp file in a linux server. Is there any hint , or coding , or server side codes ?
View Replies
View Related
Am trying to include a txt file from another site...This is the code I am using:
<table width="540" border="1" cellspacing="1" cellpadding="5" align="center" bordercolor="#DCDCDC" style="BORDER-COLLAPSE: collapse">
<tr class="text" align="center">
        <td width="250">
        Name</td>
        <td width="250">Type</td>
        <td width="40">Info</td>
        </tr>
       Â
<!--#include virtual="http://www.anothersite.com/MyFile.txt" --> Â Â Â Â Â Â Â Â
</table>
The contents of the txt file are all arranged with appropriate html so am hoping the output will be displayed appropriately on this ASP page.
View Replies
View Related
response.write("<a href=""editprofile.asp"" class=""default"">Edit Profile</a> / <a href=""viewprofile.asp"" class=""default"">View Profile</a> / <a href=""mymessages.asp"" class=""default"">My Messages</a>")
how do i put: <!--#include file="noofmessages.asp" --> at the end of my code in the last link My Messages?
View Replies
View Related
i want create a form that include many text boxes and an fiel field for upload a file to server but when i add "enctype="multipart/form-data" in the form tag i cant get the texts . how can i do a form working with file upload and text fields.
View Replies
View Related
I have an asp site which I try to bet unicode compatible (UTF-8
codepage=65001). In the site a user can upload documents and I store the
document on the server in a database. I also store the original filename. If
this filename contains for example swedish characters like å,ä ö which are
outside ascii 0-127 i get problems when I try to download the file from
server-->client.
In my com+ packages (which are instantiated from asp files) I set the
following headers/content types
GetObjectContext("Response").contentType = "application/octet-stream"
GetObjectContext("Response").AddHeader "Content-Disposition", "attachment;
filename=" & rs("orgfilename")
The database value is correct and I have set the codepage in the ASP file to
65001 (UTF-8). The problem is that the filename shown in the "Save as"
dialog is incorrect. If the filename only include a-z the filename are shown
correct.
I tried adding a charset header but it does not work.
GetObjectContext("Response").AddHeader "Charset", "UTF-8"
Browsers used: IE6 sp1.
View Replies
View Related
i'm converting an image file to hexa..then the hexa is saved to a text file..
can any one help me how to read the content text of a text file?...
im doing it this way because i don't want to save hexa in my database, because it makes the database slower to open up.
View Replies
View Related
is there a way, using asp, to find out the width and height of an image file?
View Replies
View Related
I have code that loops through a directory reading files..
now the problem is that files are constantly being uploaded and I only want the file system object to read those that are finished being uploaded.
How can I check the properties of the file to see if it's in middle of being written before i read the file?
View Replies
View Related
i am having a problem in how to create a Open File dialog to enable user to select a image file that will be stored into database. i just want the file path to be stored in database, not the image.
View Replies
View Related
It works if the file in on the server side, how to use the component (DSOleFile) with the file on the client side? Also how can I calculate the width of the file. (Page set up - Landscape or porrait). Code:
View Replies
View Related
I need to do online streaming multimedia file on my web portal, just like those online portal that selling MP3. User need to click on the preview link to stream the audio file to listen before they decide to buy the file or not. How do i link my audio file in my web server to allow it to be stream? Totally lost on this function,
View Replies
View Related
This question has to do with MS file search but it is happening only with
..asp pages, so I though someone programming with .asp pages has experienced
the same situation.
I'm trying to find .asp pages with a certain table name (i.e.
"renewalInfo" )
When I ran the search I get no results. I know that I have that string in a
couple of pages. My file system search engine is working fine with other
file types, like Word documents, Excel spreadsheets, etc.
I tried typing the string outside the <% %> tags and when I do the search I
get the file results, so it seems like if the search engine in my file
system was not searching inside the <%%> tags. Code:
View Replies
View Related
I'm having a problem with the fact that I want to allow image files to be uploaded to a remote web server, as the hosting package the web site is on is IIS6 and has a default file upload size limit of 200kb. As it's a shared hosting package, the default limit cannot be changed for me unfortunately.
Anyway - i need to check the size of the file being uploaded, so i can notify the user and prevent them getting the default Microsoft error message page. The problem is that I can't implement a server side size check which works, using either Request.TotalBytes or load.getFileSize (with "load" being an object of my loader class). It seems that I can't carry out any of these operations when the file size is too large.
View Replies
View Related
I'm trying to run the server.execute command inside a executed file. It doesn't work. Can anybody tell me why? I've searched all around and haven't found a reason. Could it be because it's not supose to work, or is the syntax diferent then in the first file?
It's something like this:
File 1
...
<%Server.Execute("File2.asp")%>
...
File 2
...
<%Server.Execute("file3.asp")%>
...
File 3
<HTML>
<body>
Hello!
</body>
</HTML>
Is this possible?
View Replies
View Related
I am using the File System Object to create server side cookies and part of
the Function that I am writing deletes a file but I am getting a permissions
denied error on that line of code.
I am using Integrated security only on this site but how do I get the
IUSER_Machinename account to work with Integrated Security?
View Replies
View Related
I have an asp page written entirely in jscript with a vbscript used as an include file which one variable on the page must access.
When the page runs, I run into jscript complilation errors when it tries to access the include file (since it is written in vbscript), and I can't figure out how to get the two to work together. How do you get both scripting languages to work on the same page?
View Replies
View Related
if i got a file path as a variable say for Example:
c:folder1folder2folder3folder4file.txt (The Path could be any long)
how do i just store the Path of the file name and the file name seperately. like :
File Path=c:folder1folder2folder3folder4
File Name=file.txt
View Replies
View Related
I would like to add a facility to my web page which allows users to upload basic files (word, excel, text, gif, jpg etc) to the server.
I know there's a facility to do this using HMTL forms, but I don't know how to handle the file on the server side.
What I think I need is an ASP file running some code to manipulate the filesystemobject, allowing me to receive the file and store it in the filesystem on the server. It would be nice to access some of the file properties too (name, type etc).
I've seen a few custom components online which allow you to do this, but I can't depend on installing them. I need to be able to script it myself.
View Replies
View Related
I have a page on our intranet that is supposed to stream an Excel sheet to
the user. I'm using pretty standard code:
View Replies
View Related
Does anyone know of a method of converting text files to sound files (.wav, mp3 etc) which can be accessed from ASP?
I have an ASP-based website that enables users to design choreography for equestrian dressage. The resulting design is held as a series of coded movements in a database and it can then be reproduced as text or as a series of diagrams. I would like to offer the option of an audio version.
View Replies
View Related
i would like to add a user and set file permission to a file with ASP.
(No component). is that possible ? do you have a link ? an example ?
View Replies
View Related
I would like to use this code on my website to allow simple file uploads from clients. I would like to restrict the file types they can upload. Code:
View Replies
View Related
i am currently working on a project in which part of the requirements are to store files on the Server filesystem and make these files available for download by users. Is there a simple way to provide the user with a link which starts downloading the file when it is clicked?
View Replies
View Related
I have an upload feature on my site... it works fine... but I want to validate the uploading file extension for .doc or .html before being uploaded to the server(client-side).
I have the validation to check text fields are not blank.... The first validation is for checking the text field... the second "blob" is the file upload field.... This is my code in Vbscript.. Code:
View Replies
View Related
I have an asp page, which displays graphical images.I am using Flipper graph in my application.
There is a link in the asp page "Click to view Image file",On clicking on this link,The graphical image need to be stored(Preferably in the server machine) and has to be opened in a new browser window.
To explain in detail. On clicking of that link"Click to view Image file" a function is called which does the following
1)Save the image file(.gif file) on the server machine
Graph.ImagetoGif("Location to be saved",100,200);
2) Opens the image on a new browser window.
window.open('from location from where the image is to be retreived',100,some more properties) So i need the image file to be saved in the server and retreived from the server.
View Replies
View Related
Does anyone have knowledge of converting text file to .iff file. I am working on a VB ASP application. I searched for example on internet but I didn't get anything.
If you have any idea of converting text file to .iff file (VB ASP) please share with me.
View Replies
View Related
At my site I have designed a framework with tabs as below:
(tabs_1.asp)
+----+ +------+ +-------+
| MC | | Cars | | Boats |
+ +-------------------------
then, into tabs_1.asp I include another page
(tabs_1_2.asp)
--------+ +--------------
| New | | Used | | Crasched |
+-----+ +------+ +----------+
Works fine so far... Here comes the problem...
The file tabs_1_2.asp has an included page (data.asp) witch doesnt appear...
When I look at the sourcecode from the webbrowser it seems to have been included but nothing is visible.
Is it inpossible to make several includes in the way I described?
View Replies
View Related
I want to read an asp file as a text file. The problem is that the file that I want it to read is located on a server. For example: I want to read te content of this file: http://www.bnro.ro/Ro/Info/default.asp . I want to look after some values in that file.
View Replies
View Related