Sco*_*ing 4 html css php security iframe
您好我正在尝试将其他网站的网页链接包含到我的网站中.我怎样才能做到这一点?
我试过了
<?php web_include ('http://website.com/website.html') ; ?>
但是在此语句之后没有加载所有命令.我想直接在我的主页上添加另一个网页.我的主页完全是用php设计的,但另一个是html或php.
我也试过,<?php include("http://www.othersite.com/filename.html"); ?>
但这个HTML根本没有加载.
可能的解决方案: 好的,这就是我正在使用的
<iframe name="FRAMENAME" src="http://website.com/dropdown.html" width="1000" style="z-index:10000" height="40" frameborder="0" scrolling="no" allowautotransparency=true></iframe>
我只是为我的索引页面添加了一个下拉菜单.我网站的CMS限制我查看IE中的dorpdown.当我查看dropdown.html页面时,我可以看到下拉列表,因此我尝试使用iframe.现在使用iframe我也可以看到IE中的下拉列表,但下拉列表没有显示在顶部.它显示在网站上的其他图像后面.我如何在其他图像之上得到它.z-index不适用于此.
roo*_*ook 32
这段代码需要allow_url_include=On
在php.ini中,默认情况下禁用它,因为它是一个巨大的安全风险.这称为远程文件包含(RFI)漏洞.如果此站点上有PHP代码,它将在您的服务器上执行.
非常不安全:
<?php include("http://www.othersite.com/filename.html"); ?>
Run Code Online (Sandbox Code Playgroud)
你可能想要的是:
<?php print file_get_contents("http://www.othersite.com/filename.html"); ?>
Run Code Online (Sandbox Code Playgroud)
但是,这在技术上是一个XSS漏洞.所以,如果您信任该网站则没有问题.但是你可能想在打印之前运行Html Purifer.
归档时间: |
|
查看次数: |
24554 次 |
最近记录: |