“cara mengatur url basis di codeigniter” Kode Jawaban

cara mengatur url basis di codeigniter

$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$base_url .= "://". @$_SERVER['HTTP_HOST'];
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = $base_url;
Yawning Yacare

Codeigniter URL Basis Dinamis

defined('BASE_URL') OR define('BASE_URL', (is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . '/');
$config['base_url'] = BASE_URL;
Confused Chipmunk

Codeigniter base_url

$this->load->helper('url');
Wrong Wolverine

Perbaiki base_url yang berfungsi untuk lokal dan server keduanya di CodeIgniter

$config['base_url'] = "http://".$_SERVER['SERVER_NAME']."/project_name/";
this way you config you base_url , then won't worry about in hosting. both works in localhost and server.
Ankur

URL Basis Codeigniter Otomatis

$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$base_url .= "://". @$_SERVER['HTTP_HOST'];
$base_url .=     str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = $base_url;
Harendra

Jawaban yang mirip dengan “cara mengatur url basis di codeigniter”

Pertanyaan yang mirip dengan “cara mengatur url basis di codeigniter”

Lebih banyak jawaban terkait untuk “cara mengatur url basis di codeigniter” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya