本文整理汇总了PHP中common::SetLinkPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP common::SetLinkPrefix方法的具体用法?PHP common::SetLinkPrefix怎么用?PHP common::SetLinkPrefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common
的用法示例。
在下文中一共展示了common::SetLinkPrefix方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stop
/**
* Stop loading gpEasy
* Check to see if gpEasy has already been installed
*
*/
static function stop()
{
global $dataDir;
if (!gpFiles::Exists($dataDir . '/data/_site/config.php')) {
if (file_exists($dataDir . '/include/install/install.php')) {
common::SetLinkPrefix();
includeFile('install/install.php');
die;
}
}
die('<p>Notice: The site configuration did not load properly.</p>' . '<p>If you are the site administrator, you can troubleshoot the problem turning debugging "on" or bypass it by enabling gpEasy safe mode.</p>' . '<p>More information is available in the <a href="http://docs.gpeasy.com/Main/Troubleshooting">gpEasy documentation</a>.</p>' . common::ErrorBuffer(true, false));
}
示例2: TestResponse
/**
* Try to fetch a response using RemoteGet to see if we're getting a 500 error
*
* @access public
* @static
* @since 1.7
*
* @return boolean
*/
static function TestResponse()
{
//get url, force gp_rewrite to $new_gp_rewrite
$rewrite_before = $_SERVER['gp_rewrite'];
$_SERVER['gp_rewrite'] = true;
common::SetLinkPrefix();
$abs_url = common::AbsoluteUrl('Site_Map', '', true, false);
$_SERVER['gp_rewrite'] = $rewrite_before;
common::SetLinkPrefix();
$result = gpRemoteGet::Get_Successful($abs_url);
if (!$result) {
return false;
}
return true;
}
示例3: ob_start
<?php
ob_start();
echo "\n************************************************************************************";
echo "\nBegin gpEasy Tests\n\n";
defined('is_running') or define('is_running', true);
defined('gp_unit_testing') or define('gp_unit_testing', true);
global $dataDir;
$dataDir = $_SERVER['PWD'];
include 'include/common.php';
common::SetLinkPrefix();
includeFile('tool/display.php');
includeFile('tool/Files.php');
includeFile('tool/gpOutput.php');
includeFile('tool/functions.php');
includeFile('tool/Plugins.php');
class gptest_bootstrap extends PHPUnit_Framework_TestCase
{
function setUP()
{
common::GetLangFile();
}
static function log($msg)
{
static $fp;
if (!$fp) {
$log = __DIR__ . '/phpunit.log';
$fp = fopen($log, 'a');
}
fwrite($fp, "\n" . print_r($msg, TRUE));
}
示例4: gpInstalled
/**
* Determine if gpEasy has been installed
*
*/
function gpInstalled()
{
global $dataDir;
if (@file_exists($dataDir . '/data/_site/config.php')) {
return;
}
if (file_exists($dataDir . '/include/install/install.php')) {
common::SetLinkPrefix();
includeFile('install/install.php');
die;
}
die('<p>Sorry, this site is temporarily unavailable.</p>');
}
示例5: TestResponse
/**
* Try to fetch a response using RemoteGet to see if we're getting a 500 error
*
* @access public
* @static
* @since 1.7
*
* @return boolean
*/
public static function TestResponse($new_rewrite = true)
{
//get url, force gp_rewrite to $new_gp_rewrite
$rewrite_before = $_SERVER['gp_rewrite'];
$_SERVER['gp_rewrite'] = $new_rewrite;
common::SetLinkPrefix();
$abs_url = common::AbsoluteUrl('Site_Map', '', true, false);
//can't be special_site_map, otherwise common::IndexToTitle() will be called during install
$_SERVER['gp_rewrite'] = $rewrite_before;
common::SetLinkPrefix();
return self::ConfirmGet($abs_url, false);
}