RE: [PHP] php and CSS
| From: | Robert Sossomon | Date: | Mon, 14 Jun 2004 20:19:34 +0000 |
| Subject: | RE: [PHP] php and CSS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188274@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Bruno Santos [mailto:brvds@netvisao.pt]
Sent: Monday, June 14, 2004 4:04 PM
To: Robert Sossomon
Cc: php-general@lists.php.net
Subject: Re: [PHP] php and CSS
Robert Sossomon wrote:
> Bruno,
>
> Drop some code our way, it's just a guessing game for me without it.
>
> Robert
>
> -----Original Message-----
> From: Bruno Santos [mailto:brvds@netvisao.pt]
> Sent: Monday, June 14, 2004 3:28 PM
> To: php-general@lists.php.net
> Subject: [PHP] php and CSS
>
>
> Hello all.
>
>
>
> Im deleloping some PHP pages for school work, and now, im trying to
> put
> the pages nice, with some colors and images, etc...
>
> I found a problem regarding CSS and PHP
>
> The same page, with html extension, it works fine, but when the page
> becames with php extension, the CSS just dont work..
>
> Someone has any idea why this is happening ??
>
>
> Cheers
>
Well, here is it:
<?php
require ('funcoes.php');
/*
Página de Ajuda. Apartir desta pagina, acede-se a ajuda
que e pedida pelo utilizador.
Os ficheiros de ajuda estao numa pasta chamada help, e
sao txt.
*/
?>
<html>
<head><title>Ajuda</title>
<LINK rel="StyleSheet" type="text/css" href="ajuda.css">
</head>
<body>
<?php
if (isset ($_GET['idhlp'])) {
//abrir o ficheiro
$fileName = HELP.'/'.$_GET['idhlp'].'.txt';
$fp = fopen ($fileName,'r'); //abrir ficheiro de ajuda
/*
$contents = fread ($fp, filesize ($fileName));
fclose ($fp); */
//por questoes de seguranca, vamos retirar as tags html
do ficheiro
//$contents = strip_tags ($contents);
//imprimir o html
$titulo = fgets ($fp,1024);
echo '<table widht=100%>';
echo '<tr>';
echo '<td class="titulo">'.$titulo.'</td>';
echo '</tr>';
echo '<tr><td>';
while (!feof($fp)) {
$buffer = fgets ($fp,1024);
echo $buffer;
}
echo '</td></tr>';
echo '<tr><td><input type="button" value="fechar"
onclick="window.close()">';
echo '</table>';
}
else {
Header("Location: index.php");
}
echo '</body></html>';
?>
has some coments in Portuguese, but, the essential is the first lines.
I've always done this way, and always has work... till now... =:(
Cheers