Was bedeutet der fehler: Cannot redeclare cleanup()
Verfasst: 24.03.2003 18:10
Kommt beim ausführen von:
Wo liegt da der fehler ?
Code: Alles auswählen
function getfile($modulepath, $file, $phpEx)
{
global $file;
global $phpEx;
function cleanup($file, $phpEx)
{
$file = str_replace('.txt', $phpEx, $file);
rename($file, 'admin_' . $file);
echo str_replace($phpEx, '', $file) . 'was successfully installed<br />';
}
if ( @exec('wget ' . $modulepath . $file) )
{
cleanup($file, $phpEx);
}
else if ( @system('wget ' . $modulepath . $file) )
{
cleanup($file, $phpEx);
}
else if ( @passthru('wget ' . $modulepath . $file) )
{
cleanup($file, $phpEx);
}
else
{
$file = str_replace('.txt', $phpEx, $file);
$file = str_replace($file, 'admin_' . $file . $phpEx, $file);
echo 'Please upload ' . $file . ' into your admin/ folder<br />';
}
}
getfile($modulepath, 'psaux.txt', $phpEx);