Try this:
$this->_url = trim("http://" . $host . implode('/', $script) . '/zk/');
And try if the URL are clear and in a good format!
class ZKBrigde {
private $_url;
public function __construct() {
$host = $_SERVER['HTTP_HOST'];
$script = $_SERVER['SCRIPT_NAME'];
$script = explode('/', $script);
array_pop($script);
$this->_url = trim("http://" . $host . implode('/', $script) . '/zk/');
$open = open("test.txt", "w");fwrite($open, $this->_url);fclose($open);
}
Take a look in test.txt when you've tested the script.