la pagina include.php:
codice:
<?php
function html_heading($title)
{
$site_css=$_GET["css"];
if(!$site_css || !strstr($site_css,".css"))
$css="default.css";
else
$css=$site_css;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo($title); ?></title>
<link href="css/sites/<?php echo($css);?>" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<?php }?>
viene inclusa in tutte le pagine del sito.
La pagina index.php:
codice:
<?php
include("include.php");
html_heading("Home page"); ?>
<body>
bla bla bla
</body>
che la include, se aperta da Dreamweaver, non viene interpretata come XMTML ma come HTML,poichè non contiene esplicitamente il testo:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
La mia domanda era:
è possibile far interpretare da Dreamweaver queste pagine senza DTD come XHTML chiudendo così i non-closed tag ed evitando di correggermi tutti gli attributi onclick, onchange, ecc ecc in onClick, onChange, ecc ecc?