Incredibile raga ho risolto...
ed esteso pure...
la classe è diventata cosi:
Codice PHP:
class verifica_browser {
var $browser;
function browser() {
$this->browser = $browser;
}
function trova_browser() {
$this->browser = $_SERVER['HTTP_USER_AGENT'];
$risultato_browser = strstr($this->browser, "MSIE") ? TRUE : FALSE;
}
}
class browser extends verifica_browser {
var $stile_ie = "index_ie.css";
var $stile_ff = "index_ff.css";
function browser_ie($stile) {
$this->browser();
$this->stile_ie = $stile_ie;
$this->stile_ff = $stile_ff;
}
function stile() {
if (parent::trova_browser()) {
echo $this->stile_ie;
} else {
echo $this->stile_ff;
}
}
}
e sull'index:
Codice PHP:
include_once("classi/browser_classe.php");
$br = new browser;
$br->stile();
su firefox mi stampa index_ff.css e su IE l'altro.. Grandioso!!!!!!!!!
Toglietemi una curiosità.. almeno stò ragionando bene??
Vi amo