I'm using includes to create a template type page. Here is the code:
<?php
include ("template/head.php");
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td valign="top" align="left" width="175">
<?php
include ("template/side_menu.php");
?></td>
<td width="1" valign="top"> </td>
<td valign="top">
<div id="content">
<?php
$main_body = $_GET['p'];
$main_body = mysql_real_escape_string($main_body);
if ($main_body = '')
{
include ("pages/default.php");
}
else
{
include ("pages/$main_body");
}
?>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="456"> </td>
</tr>
</table>
</div>
</td>
<td width="1" valign="top"> </td>
</tr>
<tr>
<td valign="top" align="left"></td>
<td valign="top"></td>
<td valign="top">
<?php
include ("template/bottom_menu.php");
?>
However I keep getting this error, Please someone help me figure this out. My include path appears to be correct, but evidentially I'm missing something else.
Warning: main(pages/) [function.main]: failed to open stream: Permission denied in C:\AppServ\ on line 37
Warning: main() [function.include]: Failed opening 'pages/' for inclusion (include_path='.;c:\php\includes; c:\appserv\ c:\appserv\ in C:\AppServ\ on line 37
<?php
include ("template/head.php");
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td valign="top" align="left" width="175">
<?php
include ("template/side_menu.php");
?></td>
<td width="1" valign="top"> </td>
<td valign="top">
<div id="content">
<?php
$main_body = $_GET['p'];
$main_body = mysql_real_escape_string($main_body);
if ($main_body = '')
{
include ("pages/default.php");
}
else
{
include ("pages/$main_body");
}
?>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="456"> </td>
</tr>
</table>
</div>
</td>
<td width="1" valign="top"> </td>
</tr>
<tr>
<td valign="top" align="left"></td>
<td valign="top"></td>
<td valign="top">
<?php
include ("template/bottom_menu.php");
?>
However I keep getting this error, Please someone help me figure this out. My include path appears to be correct, but evidentially I'm missing something else.
Warning: main(pages/) [function.main]: failed to open stream: Permission denied in C:\AppServ\ on line 37
Warning: main() [function.include]: Failed opening 'pages/' for inclusion (include_path='.;c:\php\includes; c:\appserv\ c:\appserv\ in C:\AppServ\ on line 37