SSI Help
- PieStomp
-
PieStomp
- Member since: Jun. 7, 2000
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
I have a template file that has an include in it to an html file. This template file is opened through a cgi script. When I put the path to the template file in the address, I can see the file i'm trying to include. When I go view it through it's natural path through the cgi, I do not see the included file. Does anyone know if there is a way to fix this so I can see the file i'm trying to include??
- liljim
-
liljim
- Member since: Dec. 16, 1999
- Offline.
-
- Send Private Message
- Browse All Posts (11,644)
- Block
-
- Forum Stats
- Staff
- Level 28
- Blank Slate
At 10/8/01 01:13 PM, PieStomp wrote: I have a template file that has an include in it to an html file. This template file is opened through a cgi script. When I put the path to the template file in the address, I can see the file i'm trying to include. When I go view it through it's natural path through the cgi, I do not see the included file. Does anyone know if there is a way to fix this so I can see the file i'm trying to include??
What's the error? (That usually helps diagnose the problem).
Are you including the file as the url to the file, or the actual path to the file? You should be doing the latter. If this is the cause of the problem, you'll need to find out your document root, then include the file that way, like this:
/home/username/htmldocs/script.html
as opposed to
http://www.sitename.com/script.html
Your hosting solution should be able to provide you with details of your document root.
- liljim
-
liljim
- Member since: Dec. 16, 1999
- Offline.
-
- Send Private Message
- Browse All Posts (11,644)
- Block
-
- Forum Stats
- Staff
- Level 28
- Blank Slate
At 10/8/01 02:22 PM, liljim wrote:At 10/8/01 01:13 PM, PieStomp wrote: When I go view it through it's natural path through the cgi, I do not see the included file.
Damnit,
I should quit skim reading....
Can you post some of your code, and maybe a link to the page you're having trouble with?
- PieStomp
-
PieStomp
- Member since: Jun. 7, 2000
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
Well, my error is just that I can not view the header i'm trying to include. See, what I have is a cgi script for login. User enters name and password and logs in. Inside the cgi script I have:
$t = HTML::Template->new(filename => "welcome.tpl", die_on_bad_params => 0 );
where the .tpl file is my template and the content is populated from a database.
i have a .htaccess file that looks like this:
Options All
Options +Includes
AddType text/html .html
AddHandler server-parsed .html
AddType text/html .tpl
AddHandler server-parsed .tpl
AddType text/html .htm
AddHandler server-parsed .htm
so therefore if you view the .tpl file, the included header shows up. If I try to log in and the script loads the .tpl file, the header does not load, but the rest of the page loads correctly.
- RancidScammerDude
-
RancidScammerDude
- Member since: Jul. 27, 2001
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
- QwaNkerkas
-
QwaNkerkas
- Member since: Sep. 23, 2001
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
At 10/21/01 01:21 AM, Mutilated-Puppet wrote: I would not recomend Saving a Template cause they often results in erros when loading. Just take a current source and modify that. Page Builders work pretty good.....
I would have to agree with Mutilated-Puppet.

