Senin, 13 Mei 2013

Membuat base_url dinamis di CodeIgniter

,
Buka file config.php pada folder aplication/config
cari tulisan

$config['base_url'] =' ';

rubah menjadi

$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://';
$newurl = str_replace('index.php','', $_SERVER['SCRIPT_NAME']);
$config['base_url']    = "$http" . $_SERVER['SERVER_NAME'] . "" . $newurl;

save..

0 komentar to “Membuat base_url dinamis di CodeIgniter”

Posting Komentar