explorer da dosyayı çalıştırımanız yeterli
http://www.xxxxx.com/cache.php gibi
bu kod cache temizliği yapmak içindir.
Kod: Tümünü seç
<?php
/**
*
* @package phpBB3
* @copyright (c) 2009 3Di - delete_cache.php v. 0001 - 2009-2-28
* @
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @additional changes made by djdurant [ www.lpcontrol.com ]
*/
/**
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// is the user logged in?
if (!$user->data['is_registered'])
{
if ($user->data['is_bot'])
{
// the user is a bot, send them back to home base...
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}
// the user is not logged in, give them a chance to login here...
login_box('', 'LOGIN');
}
else if (!$auth->acl_get('a_'))
{
// User is not an admin...
trigger_error('NOT_AUTHORISED');
}
// Purges the tmp cache files based on time-frame
function delete_cache()
{
global $phpbb_root_path;
$phpbb_cache = ($phpbb_root_path . 'cache');
// time in seconds the files are allowed to last into the cache dir
$seconds_old = 1;
// directory check-in first
if (is_dir("$phpbb_cache"))
{
$handle=opendir($phpbb_cache);
while (false!==($tmp_phpbb_cache_files = readdir($handle)))
{
// we delete everything but index.htm, .htaccess and sub-folders
if ($tmp_phpbb_cache_files != "." && $tmp_phpbb_cache_files != ".." && $tmp_phpbb_cache_files != "index.htm" && $tmp_phpbb_cache_files != ".htaccess")
{
$diff = (time() - filectime("$phpbb_cache/$tmp_phpbb_cache_files"));
if ($diff > $seconds_old)
{
unlink("$phpbb_cache/$tmp_phpbb_cache_files");
}
}
}
closedir($handle);
}
// that should never happen..
else
{
trigger_error('CACHE_DIR_ERROR');
}
}
delete_cache();
?>