本文整理汇总了PHP中CI_Config::base_url方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Config::base_url方法的具体用法?PHP CI_Config::base_url怎么用?PHP CI_Config::base_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CI_Config
的用法示例。
在下文中一共展示了CI_Config::base_url方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function base_url($uri = '')
{
$url = parent::base_url($uri);
if ($_SERVER['SERVER_PORT'] == 443) {
$url = str_replace('http://', 'https://', $url);
}
return $url;
}
示例2: implode
function base_url($uri = '')
{
if (is_array($uri)) {
$uri = implode('/', $uri);
}
if (function_exists('get_instance')) {
$CI =& get_instance();
$uri = $CI->lang->localized($uri);
}
return parent::base_url($uri);
}
示例3: fopen
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
define('FOPEN_READ', 'rb');
define('FOPEN_READ_WRITE', 'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb');
// truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b');
// truncates existing file data, use with care
define('FOPEN_WRITE_CREATE', 'ab');
define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
require FCPATH . "system/core/Config.php";
$url = new CI_Config();
define("BASEURL", $url->base_url());
define("SITEURL", $url->site_url());
/* End of file constants.php */
/* Location: ./application/config/constants.php */