PHP 框架
我可以在 PHP 中使用 HTML 框架吗?
我想我可以通过..
<?php
session_start();
require("auth.php");
require("do_html_header.php");
if($_SESSION['SESS_admin'] == 0)
require("do_menu.php");
else
require("do_menu3.php");
do_html_header();
print"<h1>Welcome ". $_SESSION['SESS_FIRST_NAME']."!</h1>";
do_menu();
?>
</body>
<frameset rows="50%,50%">
<frame noresize="noresize" src="limits.php" />
<frame noresize="noresize" src="limits.php" />
</frameset>
</html>
我把它放在各处,但它似乎没有出现..
谷歌只是让我困惑。
提前致谢:D
Can I use HTML Frames with PHP?
I presumed I can do this by..
<?php
session_start();
require("auth.php");
require("do_html_header.php");
if($_SESSION['SESS_admin'] == 0)
require("do_menu.php");
else
require("do_menu3.php");
do_html_header();
print"<h1>Welcome ". $_SESSION['SESS_FIRST_NAME']."!</h1>";
do_menu();
?>
</body>
<frameset rows="50%,50%">
<frame noresize="noresize" src="limits.php" />
<frame noresize="noresize" src="limits.php" />
</frameset>
</html>
I have put it everywhere but it seems not to show up..
Google just confused me.
Thanks in Advance :D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将 PHP 与 HTML 框架集结合使用,但不应在框架集页面的,而不是
元素中输出任何内容(即使如此,它也应该是
)。内容位于
元素包含的各个页面中。
无论如何,不要使用框架。 PHP 作为模板语言旨在帮助您通过 包含 的方式分离页面的组件,首先渲染框架集是完全不必要的。
You can use PHP with HTML framesets, but you shouldn't be outputting anything in a
<body>
element of a frameset page (even then it should be<noframes>
, not<body>
). Content goes within the individual pages contained by your<frame />
elements.Anyway, don't use frames. PHP as a templating language is meant to help you separate components of your pages by way of includes, rendering framesets completely unnecessary in the first place.
是的,您可以使用框架。但您必须输出框架集文件中的实际内容,在您的例子中为
limits.php
。这里要注意一些事情:我之前使用框架来实现 NortonCommand-克隆在网络上,它比 CSS 排列 div 更有意义。然而,使用框架处理 jQuery 更加麻烦。对于 PHP 来说,就像将每个框架脚本视为单独的入口脚本一样简单。
Yes, you can use frames. But you'll have to output the actual content in the frameset files, in your case
limits.php
. Beware of a few things here:I've previously used frames for implementing a NortonCommand-clone for the web, where it's more senseful than CSS-arranging divs. However, handling jQuery is more cumbersome with frames. In regards to PHP it's as simple as treating every frame script as individual entry script.