Last active
September 7, 2020 19:52
-
-
Save maulayyacyber/2fffd688363c51fc1025a895b46b3edf to your computer and use it in GitHub Desktop.
How To Create CDN on CodeIgniter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
/** | |
* @package Content Delivery Network - BelanCon.com | Belanja Icon | |
* @version 1.0 | |
* @author Belancon Dev Team | |
* @copyright Copyright © 2016 Belancon - Belanja Icon. | |
* @link https://belancon.com | |
*/ | |
//function CDN - Content Delivery Network | |
if(!function_exists('cdn')) | |
{ | |
function cdn($str = NULL) | |
{ | |
return get_instance()->config->item('cdn') . $str; | |
} | |
} | |
//function CLOUD - Server Management storage | |
if(!function_exists('cloud')) | |
{ | |
function cloud($str = NULL) | |
{ | |
return get_instance()->config->item('cloud') . $str; | |
} | |
} | |
//function CLOUD - Server Management storage | |
if(!function_exists('cloud_path')) | |
{ | |
function cloud_path($str = NULL) | |
{ | |
return get_instance()->config->item('cloud_path') . $str; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Other virtual host | |
|-------------------------------------------------------------------------- | |
*/ | |
$config['cdn'] = ((ENVIRONMENT != 'production')?'//cdn.localhost/belancon/':'//cdn.belancon.com/belancon/'); | |
// $config['cloud'] = ((ENVIRONMENT != 'production')?'//cloud.localhost/belancon/':'//cloud.belancon.com/belancon/'); | |
$config['cloud'] = ((ENVIRONMENT != 'production') ? 'http://localhost/cloud-belancon/': '//cloud.belancon.com/belancon/'); | |
$config['cloud_path'] = ((ENVIRONMENT != 'production') ? 'http://localhost/cloud-belancon/': 'http://cloud.belancon.com/'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Path upload cloud | |
|-------------------------------------------------------------------------- | |
*/ | |
$config['path'] = '../cloud/'; | |
/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment