Rád bych integroval systém komentářů blogu spolu s punBB fórem - s využitím pluginu http://forums.punbb.org/viewtopic.php?id=8373
Vše bych měl mít nastaveno správně, absolutní adresu jsem si zjistil také - viz skript, co jsem našel na netu :
ALE: při aktivování pluginu mi to při napsání jakéhokoli příspěvku vyhodí hlášku:<?php
$path = getcwd();
echo "Your Absoluthe Path is: ";
echo $path;
?>
Kód: Vybrat vše
Fatal error: Cannot redeclare unregister_globals() in /home/www/shadowblog.cz/www/forum/include/functions.php on line 1037Patřičný výtah z functions.php:
Co s tím? Prosím, někdo zručný, pomozte mi, přeci jen nejsem webový programátor, ale spíše takový webový dobrodruh//
// Unset any variables instantiated as a result of register_globals being enabled
//
function unregister_globals()
{
// Prevent script.php?GLOBALS[foo]=bar
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) <- To je line 1037
exit('I\'ll have a steak sandwich and... a steak sandwich.');
// Variables that shouldn't be unset
$no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
// Remove elements in $GLOBALS that are present in any of the superglobals
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
foreach ($input as $k => $v)
{
if (!in_array($k, $no_unset) && isset($GLOBALS[$k]))
unset($GLOBALS[$k]);
}
}
EDIT:
ve wp-settings.php je ještě násl. code:
<?php
// Turn register globals off
function unregister_GLOBALS() {
if ( !ini_get('register_globals') )
return;
if ( isset($_REQUEST['GLOBALS']) )
die('GLOBALS overwrite attempt detected');
// Variables that shouldn't be unset
$noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
foreach ( $input as $k => $v )
if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) )
unset($GLOBALS[$k]);
}
unregister_GLOBALS();

