Mam Takie coś w :
Pokaż nowe odpowiedz na Twoje wątki
array('Source-File.php', 'FunctionToCall'), Then, you can access the FunctionToCall() function from Source-File.php with the URL index.php?action=action-in-url. Relatively simple, no? */ $forum_version = 'SMF 2.0.15'; @ini_set('memory_limit', '128M'); // Get everything started up... define('SMF', 1); if (function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime(0); error_reporting(defined('E_STRICT') ? E_ALL | E_STRICT : E_ALL); $time_start = microtime(); // This makes it so headers can be sent! ob_start(); // Do some cleaning, just in case. foreach (array('db_character_set', 'cachedir') as $variable) if (isset($GLOBALS[$variable])) unset($GLOBALS[$variable], $GLOBALS[$variable]); // Load the settings... require_once(dirname(__FILE__) . '/Settings.php'); // Make absolutely sure the cache directory is defined. if ((empty($cachedir) || !file_exists($cachedir)) && file_exists($boarddir . '/cache')) $cachedir = $boarddir . '/cache'; // And important includes. require_once($sourcedir . '/QueryString.php'); require_once($sourcedir . '/Subs.php'); require_once($sourcedir . '/Errors.php'); require_once($sourcedir . '/Load.php'); require_once($sourcedir . '/Security.php'); // Using an pre-PHP 5.1 version? if (@version_compare(PHP_VERSION, '5.1') == -1) require_once($sourcedir . '/Subs-Compat.php'); // If $maintenance is set specifically to 2, then we're upgrading or something. if (!empty($maintenance) && $maintenance == 2) db_fatal_error(); // Create a variable to store some SMF specific functions in. $smcFunc = array(); // Initate the database connection and define some database functions to use. loadDatabase(); // Load the settings from the settings table, and perform operations like optimizing. reloadSettings(); // Clean the request variables, add slashes, etc. cleanRequest(); $context = array(); // Seed the random generator. if (empty($modSettings['rand_seed']) || mt_rand(1, 250) == 69) smf_seed_generator(); // Before we get carried away, are we doing a scheduled task? If so save CPU cycles by jumping out! if (isset($_GET['scheduled'])) { require_once($sourcedir . '/ScheduledTasks.php'); AutoTask(); } // Check if compressed output is enabled, supported, and not already being done. if (!empty($modSettings['enableCompressedOutput']) && !headers_sent()) { // If zlib is being used, turn off output compression. if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1) $modSettings['enableCompressedOutput'] = '0'; else { ob_end_clean(); ob_start('ob_gzhandler'); } } // Emit some headers for some modicum of protection against nasties. if (!headers_sent()) { // Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now. header('X-Frame-Options: SAMEORIGIN'); header('X-XSS-Protection: 1'); header('X-Content-Type-Options: nosniff'); } // Register an error handler. set_error_handler('error_handler'); // Quickly catch random exceptions. set_exception_handler(function ($e) use ($db_show_debug) { if (isset($db_show_debug) && $db_show_debug === true && allowedTo('admin_forum')) fatal_error(nl2br($e), false); else fatal_error($e->getMessage(), false); }); // Start the session. (assuming it hasn't already been.) loadSession(); // Determine if this is using WAP, WAP2, or imode. Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it
Też tak macie ??