请教:php header() 执行后 为什么没跳转到相应的html

php header() 执行后 为什么没跳转到相应的html,而是出现个弹窗显示的是html的源代码.
php代码:

 $url = "homepage.html";
        if(isset($url)) 
        { 
            Header("Location: $url"); 
            exit();
        } 

图片说明

header('Location:'.$url);

你说的弹窗是怎样的? 浏览器的? 还是页面的层? 明确你一下你的问题, 贴个截图之类的

使用header这个函数之前不能有任何的输出, 例如echo等.
另外 你要理解header跳转页面实现的原理