问题描述
您好,我想将其他网站的网页连结纳入我的网站。
我如何做到这一点?
我试过
?php web_include('http://website.com/website.html'); ?>
,但所有命令在此语句之后不加载。我想直接将另一个网页加入我的首页。我的主页是完全设计在php,但另一个是html或php。
我也尝试了<?php include //www.othersite.com/filename.html);
ok这个html不能加载。
< iframe name =FRAMENAMEsrc =http://website.com/dropdown.htmlwidth =1000style =z-index:10000height =40frameborder =0scrolling =noallowautotransparency = true>< / iframe>
$ b
我只是为我的索引页添加了一个下拉菜单。我的网站的CMS限制我查看在IE中的dorpdown。当我查看dropdown.html页面,我可以看到下拉列表,所以我试图使用iframe。现在使用iframe我可以看到IE中的下拉菜单,但下拉列表不显示在顶部。它显示在网站上的其他图像的背后。我如何得到它的顶部的其他图像。
此代码需要 allow_url_include = On
在您的php.ini,默认情况下禁用,因为它是 MASSIVE安全风险。这称为漏洞。如果此网站上有PHP代码,则会在您的服务器上执行。
极不安全:
<?php include(http://www.othersite.com/filename.html); ?>
你可能想要的是:
<?php print file_get_contents(http://www.othersite.com/filename.html); ?>
但是,这在技术上是一个XSS漏洞。所以,如果你信任网站没有问题。但您可能希望在打印出来之前运行。
Hi i am trying to include a webpage link from another website into my website.how can i do this?
i tried
<?php web_include ('http://website.com/website.html') ; ?>
but all the commands are not loading after this statement. I want to include another webpage into my homepage directly. my homepage is completely designed in php, but the other one is html or php.
i also tried <?php include("http://www.othersite.com/filename.html"); ?>
but this html is not at all loading.
Possible Solution:ok this is what i am using
<iframe name="FRAMENAME" src="http://website.com/dropdown.html" width="1000" style="z-index:10000" height="40" frameborder="0" scrolling="no" allowautotransparency=true></iframe>
I am just including a dropdown menu for my index page. The CMS of the my site is restricting me from viewing the dorpdown in IE. When i view the dropdown.html page, i can see the dropdown, so I am trying to use iframe. Now using the iframe i can see the dropdown in IE as well, but the dropdown is not showing on the top. It is showing behind the other images on the site. How do i get it on top of the other images. z-index is not working for this.
This code requires allow_url_include=On
in your php.ini, which is disabled by default because it's a MASSIVE SECURITY RISK. This is called the Remote File Include (RFI) vulnerability. If there is PHP code on this site it will be executed on your server.
Extremely insecure:
<?php include("http://www.othersite.com/filename.html"); ?>
What you probably want is:
<?php print file_get_contents("http://www.othersite.com/filename.html"); ?>
However, this is technically an XSS vulnerability. So, if you trust the website there isn't a problem. But you probably want to run Html Purifer before printing it out.
这篇关于包括一个网站的php文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!