Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to set base url in 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;
Comment

dynamic base url codeigniter

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

codeigniter base_url

$this->load->helper('url');
Comment

fix working base_url for local and server both in 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.
Comment

codeigniter base url automatic

$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;
Comment

PREVIOUS NEXT
Code Example
Php :: Determining if input is present in Laravel 
Php :: php shell_exec with root 
Php :: Automatically Delete Woocommerce Images After Deleting a Product 
Php :: laravel 8 try catch 
Php :: get where different laravel 
Php :: wordpress logout 
Php :: laravel eloquent mass update 
Php :: remove element from xml on php 
Php :: check if date between two dates laravel 
Php :: php check if class exists 
Php :: Laravel Code To Rename file on server in the storage folder 
Php :: WooCommerce cart API php 
Php :: Laravel Excel numbers formatted as text still appearing as number 
Php :: laravel where multiple conditions on single colmn 
Php :: laravel blade shorthand if 
Php :: laravel 8 foreign key 
Php :: db name laravel 
Php :: laravel create model and migration 
Php :: generate slug on create laravel 
Php :: install php 5.6 mac 
Php :: add custom page to wordpress 
Php :: php day of week full name 
Php :: php et WP_Post Object 
Php :: Create Model with Controller in Laravel 
Php :: settimezone in php 
Php :: how to pass parameter in routes of laravel 
Php :: laravel model where 
Php :: php set status code 
Php :: change the date format in laravel view page 
Php :: Adding JavaScript to a Specific WordPress Post or Page Using Code in the Footer 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =