“So setzen Sie die Basis -URL in Codesigniter” Code-Antworten

So setzen Sie die Basis -URL in Codesigniter

$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

Dynamischer Basis -URL -Codesigniter

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

Codesigniter Base_url

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

Fix Working Base_url für lokale und server beide in Codesigniter

$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

Codesigniter -Basis -URL Automatisch

$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

Ähnliche Antworten wie “So setzen Sie die Basis -URL in Codesigniter”

Fragen ähnlich wie “So setzen Sie die Basis -URL in Codesigniter”

Weitere verwandte Antworten zu “So setzen Sie die Basis -URL in Codesigniter” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen