N
navid.boarder
hei all,
i can't get Css applied to my cgi-generated page. also no images are
shown.
funny part is that if I just open the HTML file it shows images and
gets Css applied. but when i open the same HTML file using CGI open
function all images are X's and no Css is applied.
and i am sure that trouble is not because of place of my files.
here's my code for lifesavers to read:
--------------------------------------------------------------------------------------
#!c:/perl/bin/perl
use CGI;
use CGI::Carp qw( fatalsToBrowser );
use DBI;
$query = new CGI;
my ($session_id, $dbh, $sth, $action, $product_id, $quantity);
&show_new;
sub show_new {
open (FILE, "ch100.html") or die "cannot open HTML source";
$title = <FILE>;
for $line (<FILE>) {
print $line;
}
close FILE;
}
--------------------------------------------------------------------------------------
please note that above code doesn't really do anything, because I've
cut unnecessary parts.
Now i give some of ch100.html's code:
--------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" Content="text-html; charset=UTF-8">
<title>chair </title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body id="lit">
i can't get Css applied to my cgi-generated page. also no images are
shown.
funny part is that if I just open the HTML file it shows images and
gets Css applied. but when i open the same HTML file using CGI open
function all images are X's and no Css is applied.
and i am sure that trouble is not because of place of my files.
here's my code for lifesavers to read:
--------------------------------------------------------------------------------------
#!c:/perl/bin/perl
use CGI;
use CGI::Carp qw( fatalsToBrowser );
use DBI;
$query = new CGI;
my ($session_id, $dbh, $sth, $action, $product_id, $quantity);
&show_new;
sub show_new {
open (FILE, "ch100.html") or die "cannot open HTML source";
$title = <FILE>;
for $line (<FILE>) {
print $line;
}
close FILE;
}
--------------------------------------------------------------------------------------
please note that above code doesn't really do anything, because I've
cut unnecessary parts.
Now i give some of ch100.html's code:
--------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" Content="text-html; charset=UTF-8">
<title>chair </title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body id="lit">