View Full Version : ASP equivalent of PHP command
jon787
September 11th, 2001, 20:32
What is the ASP equivalent of the PHP command: include()?
BillWill
September 12th, 2001, 20:28
I beleive it's the same as any SSI call, for example:
<!--#include virtual="somefilename.asp"-->
jon787
September 12th, 2001, 23:35
No, I mean the ASP equivalent of something like this:
In index.asp:
<?php
$title="Something";
include("header.inc");
?>
Page
<?php include("footer.inc"); ?>
The on header.inc:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
And footer.inc:
</body>
</html>
bigperm
September 13th, 2001, 00:13
I don't know, and this is just a guess... but wouldn't it just be:
<% $title="Something %>
<!--#include virtual "/whaterver/header.asp" -->
Your page
<!--#include virtual "/whaterver/footer.asp" -->
And then in header.asp
<html>
<head>
<title><% $title %></title>
<body>
Then footer.asp
</body>
</html>
That's just a guess though, and I doubt if that would work.
ashben
September 13th, 2001, 09:18
Originally posted by jon787
What is the ASP equivalent of the PHP command: include()?
If you are running ASP 3+ then you may try:
Server.Execute(filename)
More: http://www.4guysfromrolla.com/webtech/010700-1.shtml
kpyew
September 14th, 2001, 05:41
May try this too:
<!--#include file ="header.inc"-->
jon787
September 16th, 2001, 20:57
Thanks I will try those suggestions.
I personally use PHP includes to make header and footers for my personal webspace.
The domain I run for our school's FIRST robotics team is on an Mirco$oft host though so I can't use the include statement I have to use ASP.
I doubt they will let me switch the hosting service.
They don't even ask me before doing alot of web stuff for us.
They set up a PR email address at hotmail without asking me. The only problem with this is that we have 20 email accounts at no extra charge with our hosting service. I have now setup one at our domain without telling them and changed all the links on the website.
BillWill
September 17th, 2001, 16:58
I can sort-of relate Jon.
My school just hired a new computer teacher and she knows absolutely nothing about hardware and most of the software the curriculum wants us to learn about. She even had me teach a class about Microsoft Access because she had literally no clue. Sad part is that she claims to have been in the computer programming and software design industry for 20 years before becoming a teacher.
"Now Will, do you know how to setup a printer so it'll work in Windows 98? I need some help."
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.