Codeigniter portnumber in url
im using code igniter current version .I moved all the files to the live server i access URl as http://xxx:8084/application/ My class does not seem to load开发者_StackOverflow ,$this also does not work It stops executing before parent::controller ,i get call to a function model on non object
Make sure to set the correct base URL in application/config/config.php
. A generic solution that should work in most cases is:
$config['base_url'] = "http://" . $_SERVER['HTTP_HOST'] . str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
精彩评论