Mam problem z zaincludowaniem pliku otóż mam taki kod w index.php
<?php
// zmienna potrzebna do prawidlowego wczytania includowanych plikow
$add_site = true;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="l" />
<meta name="Author" content="" />
<head>
<title>moja stronka</title>
<style type="text/css">
<!--
body {
font-family: Verdana, Arial;
font-size: 12px;
}
-->
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="3"><?php include "include/naglowek.php"; ?></td>
</tr>
<tr>
<td width="70%" valign="top">
<?php
$go = $_GET['go'];
switch($go) {
case "1": include "page/1.php"; break;
case "2": include "mojastronka/index.php"; break; // tą strone chcę zaincludować
case "3": include "page/2.html"; break;
case "4": include "page/4.html"; break;
case "5": include "page/5.html"; break;
}
?>
</tr>
<tr>
<td width="100%" colspan="3"><?php include "include/stopka.php"; ?></td>
</tr>
</table>
</body>
</html>
a zawartość pliku mojastronka/index.php
<?php
// Help prevent register_globals injection
// Change the path to your full path if necessary
$CONF['path'] = '.';
$TMPL['version'] = '';
// Set to 1 to display SQL queries and GET/POST/COOKIE data
$CONF['debug'] = 0;
// Require some classes and start the timer
require_once("{$CONF['path']}/sources/misc/classes.php");
$TIMER = new timer;
// Connect to the database
// Set the last argument of $DB->connect to 1 to enable debug mode
require_once("{$CONF['path']}/settings_sql.php");
require_once("{$CONF['path']}/sources/sql/{$CONF['sql']}.php");
$DB = "sql_{$CONF['sql']}";
$DB = new $DB;
$DB->connect($CONF['sql_host'], $CONF['sql_username'], $CONF['sql_password'], $CONF['sql_database'], $CONF['debug']);
// Settings
$settings = $DB->fetch("SELECT * FROM {$CONF['sql_prefix']}_settings", __FILE__, __LINE__);
$ad_breaks = explode(',', $CONF['ad_breaks']); $CONF['ad_breaks'] = array(); foreach ($ad_breaks as $key => $value) {
$CONF['ad_breaks'][$value] = $value;
}
$result = $DB->query("SELECT category, skin FROM {$CONF['sql_prefix']}_categories ORDER BY category", __FILE__, __LINE__);
while (list($category, $skin) = $DB->fetch_array($result)) {
$CONF['categories'][$category] = $skin;
}
$CONF['skins_path'] = "{$CONF['path']}/skins";
$CONF['skins_url'] = "{$CONF['list_url']}/skins";
$TMPL['skins_url'] = $CONF['skins_url'];
$TMPL['list_name'] = $CONF['list_name'];
$TMPL['list_url'] = $CONF['list_url'];
// Combine the GET and POST input
// The language file
require_once("{$CONF['path']}/languages/{$CONF['default_language']}.php");
// Determine the category and skin
if (isset($FORM['cat']) && isset($CONF['categories'][$FORM['cat']])) { $TMPL['skin_name'] = $CONF['categories'][$FORM['cat']];
}
else {
$TMPL['skin_name'] = $CONF['default_skin'];
}
if (!is_dir("{$CONF['path']}/skins/{$TMPL['skin_name']}/") || !$TMPL['skin_name']) { $TMPL['skin_name'] = $CONF['default_skin'];
}
if (!is_dir("{$CONF['path']}/skins/{$CONF['default_skin']}/")) { $TMPL['skin_name'] = 'fusion';
}
require_once("{$CONF['path']}/sources/misc/skin.php");
// Is it a new day/week/month?
list($last_new_day, $last_new_week, $last_new_month, $TMPL['original_version']) = $DB->fetch("SELECT last_new_day, last_new_week, last_new_month, original_version FROM {$CONF['sql_prefix']}_etc", __FILE__, __LINE__);
$time = time() + (3600
*$CONF['time_offset']); $current_day = date('d', $time); $current_week = date('W', $time); $current_month = date('m', $time); if ($last_new_day != $current_day) {
require_once("{$CONF['path']}/sources/misc/new_day.php");
new_day($current_day);
}
if ($last_new_week != $current_week) {
require_once("{$CONF['path']}/sources/misc/new_day.php");
new_week($current_week);
}
if ($last_new_month != $current_month) {
require_once("{$CONF['path']}/sources/misc/new_day.php");
new_month($current_month);
}
// Adjust the output text based on days, weeks, or months
if ($CONF['ranking_period'] == 'weekly') {
$LNG['g_this_period'] = $LNG['g_this_week'];
$LNG['g_last_period'] = $LNG['g_last_week'];
}
elseif ($CONF['ranking_period'] == 'monthly') {
$LNG['g_this_period'] = $LNG['g_this_month'];
$LNG['g_last_period'] = $LNG['g_last_month'];
}
else {
$LNG['g_this_period'] = $LNG['g_today'];
$LNG['g_last_period'] = $LNG['g_yesterday'];
}
// Check if installer is there
$TMPL['header'] = $LNG['g_error'];
$base = new base;
$base->error($LNG['g_delete_install']);
}
// Check for hits in
require_once("{$CONF['path']}/sources/in.php");
$in = new in;
// Array containing the valid .php files from the sources directory
'admin' => 1,
'in' => 1,
'join' => 1,
'lost_pw' => 1,
'out' => 1,
'page' => 1,
'rankings' => 1,
'rate' => 1,
'search' => 1,
'stats' => 1,
'user_cpl' => 1
);
// Require the appripriate file
if (isset($FORM['a']) && isset($action[$FORM['a']])) { $page_name = $FORM['a'];
}
else {
$page_name = 'rankings';
}
require_once("{$CONF['path']}/sources/{$page_name}.php");
$page = new $page_name;
// Display the page
$skin = new main_skin('wrapper');
$DB->close();
// Print out debugging info, if necessary
if ($CONF['debug']) {
echo '<div style="clear: both;">'; foreach ($DB->queries as $value) {
echo "<hr /><pre>{$value}</pre>"; }
}
?>
korzystam w tej stronie z systemu toplistowego jak zapewne widać.
Czy może ten skrypt blokować include ?
Prosze o pomoc i z góry dziękuję (IMG:
style_emoticons/default/rolleyes.gif)