We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base_url function returns wrong value when there is a substring of server name in the url. eg:
request_url: localhost/pico/local -> base_url = host/pico/ (pico installed in pico subfolder) request_url: localhost/local -> base_url = host/ request_url: www.technology.com/tech -> base_url = www.nology.com/
solution:
private function base_url() { global $config; if(isset($config['base_url']) && $config['base_url']) return $config['base_url']; $url = ''; $request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : ''; $script_url = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : ''; if($request_url != $script_url) $url = trim(preg_replace('/'. str_replace('/', '\/', str_replace('index.php', '', $script_url)) .'/', '', $request_url, 1), '/'); $protocol = $this->get_protocol(); return $protocol . '://' . rtrim(str_replace('/'.$url, '/', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), '/'); }
The text was updated successfully, but these errors were encountered:
Fixed with #252
Sorry, something went wrong.
No branches or pull requests
base_url function returns wrong value when there is a substring of server name in the url. eg:
solution:
The text was updated successfully, but these errors were encountered: