Ho trovato qualcosa, ma come posso fare per giocare con la funzione in php include? Ti posto il codice...
codice:
<?php
if ($load == "")
{
($load = "test.php");
}
else $load == $pagina;
?>
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>TEST</title>
</head>
<script type="text/javascript">
//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.
var rootdomain="http://"+window.location.hostname
function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously
page_request.send(null)
writecontent(page_request)
}
function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}
</script>
<body link="#000080" vlink="#000080" alink="#000080" bgcolor="#FFFFFF" background="img/backgrey.gif" topmargin="2" leftmargin="1" rightmargin="1" bottommargin="1">
<span id='xawmMenuPathImg-menu' style='position:absolute;top:-50px;left:0px'>[img]./awmmenupath.gif[/img]</span><script type='text/javascript'>var MenuLinkedBy='AllWebMenus [4]', awmBN='626'; awmAltUrl='';</script><script charset='UTF-8' src='./menu.js' language='JavaScript1.2' type='text/javascript'></script><script type='text/javascript'>awmBuildMenu();</script>
<div align="center">
<table border="1" width="800" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#000000" style="border-collapse: collapse" bgcolor="#FFFFFF">
<tr>
<td><?php include ("logo.htm");?></td>
</tr>
<tr>
<td id="awmAnchor-menu" bordercolor="#356599" bordercolorlight="#356599" bordercolordark="#356599" bgcolor="#356599" height="24"></td></td>
</tr>
<tr>
<td><div align="center">
<table border="0" width="780" cellspacing="0" cellpadding="0">
</tr>
<tr>
<td id="corpo">
<?php
if ($load == "test.php")
{
($load = "test.php");
}
else $load == $pagina;
?>
//questa parte non va
<script type="text/javascript">
ajaxinclude("<?php include ("$load")?>")
</script>
</td>
</tr>
<tr>
<td>
</table>
</div>
</p>
</td>
</tr>
<tr>
<td><?php include ("footer.htm");?></td>
</tr>
</table>
</div>
</body>
</html>
Visto che sto usando una tabella, come posso utilizzare la variabile che viene passata alla pagina con la sintassi index.php?load=test2.php ?
Scusami eh se sono incapace!! :sbonk: