« Project home page

phpSQLiteCMS Forum

Back to the forum index
Open in thread

BASE_URL (Bugs)

by pangjanne, Thursday, February 25, 2010, 05:16 (196 days ago)

may be BASE_URL bug.
in windows, the dirname($_SERVER['PHP_SELF']) will return prefix '\' path;

then:
if(substr($base_url, -1) != '/') $base_url = $base_url.'/'; will return: 'http://hostname\/'.

my code:
$base_url = $protocol . $_SERVER['HTTP_HOST'] . str_replace('\\', '/', dirname($_SERVER['PHP_SELF']));

 

Complete thread:

 RSS Feed of thread

192 Postings in 89 Threads, 63 registered users, 8 users online (0 registered, 8 guests)
Forum time: 2010-09-09, 15:18
RSS Postings  RSS Threads | Contact
powered by my little forum