function __construct($path, $fallback = null) { SiteConfig::set_config_path($path, $fallback); // 20131011 Pulipuli Chen // 加入記錄 $this->path = $path; $this->fallback = $fallback; require dirname(__FILE__) . '/../../config.php'; $this->options = $options; }
function __construct($path, $fallback = null) { SiteConfig::set_config_path($path, $fallback); }
if (file_put_contents($savepath, $_POST['contents']) !== false) { echo '<p>Saved to <strong>' . $savepath . '</strong></p>'; // check caching if ($options->caching) { echo '<p>Note: caching is enabled — you may have to disable caching or delete cache files to see changes.<p>'; } if ($options->apc && function_exists('apc_delete') && function_exists('apc_cache_info')) { $_apc_data = apc_cache_info('user'); foreach ($_apc_data['cache_list'] as $_apc_item) { if (substr($_apc_item['info'], 0, 3) == 'sc.') { apc_delete($_apc_item['info']); } } echo '<p>Cleared site config cache in APC.</p>'; } SiteConfig::set_config_path(dirname($savepath)); $sconfig = SiteConfig::build($save, $exact_host_match = true); if ($sconfig) { if (!empty($sconfig->test_url)) { echo '<h4>Test URLs</h4>'; echo '<ul>'; foreach ($sconfig->test_url as $test_url) { $ftr_test_url = $test_url; if (strtolower(substr($ftr_test_url, 0, 7)) == 'http://') { $ftr_test_url = substr($ftr_test_url, 7); } $ftr_test_url = '../makefulltextfeed.php?url=' . urlencode($ftr_test_url); echo '<li>'; echo '<a href="' . htmlspecialchars($test_url) . '" target="_blank">' . htmlspecialchars($test_url) . '</a>'; echo ' | <a href="' . $ftr_test_url . '" target="_blank">Full-Text RSS result</a>'; echo ' | <a href="' . $ftr_test_url . '&debug" target="_blank">Debug</a>';