Гляньте в архиве пожалуйста, чего-то не срабатывает.
PHP:
скопировать код в буфер обмена
<?PHP include "lib.inc.php"; //include 'menu.php'; $t = 'Петя'; if(!$t) //Если ложь, тогда вывести, верно? echo 'The end!'; ?> <!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" xml:lang="ru" lang="ru"> <head> <title>Шаблон сайта</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> </head> <body> <table width="100%" border="1"> <tr> <td colspan="2" align="center"> <!-- Верхняя часть страницы --> <?PHP include "top.inc.php"; ?> </td> </tr> <tr> <td width="20%" valign="top"> <!-- Меню --> <?PHP include "menu.inc.php"; ?> </td> <td> <!-- Область основного контента --> <?PHP if ( !isset( $_GET['id'] ) ) { include 'index.php';} switch($id){ case 'page1': include 'page1.php'; break; case 'page2': include 'page2.php'; break; case 'page3': include 'page3.php'; break; case 'table': echo '<center><h1>Привет мир!</h1></center>'; default : $id = NULL; } ?> </td> </tr> <tr> <td colspan="2" align="center"> <!-- Нижняя часть страницы --> <?PHP include "bottom.inc.php"; ?> </td> </tr> </table> </body> </html>
Цитата:Notice: Undefined index: id in C:\www\htdocs\test.ru\www\index.php on line 38
Fatal error: Cannot redeclare getMenu() (previously declared in C:\www\htdocs\test.ru\www\lib.inc.php:2) in C:\www\htdocs\test.ru\www\lib.inc.php on line 12
|