问题描述
此处已阅读有关此主题的许多专家建议。不过,有时候这很笼统,没有结合使用不的建议来使用Bootstrap或Flexbox的解决方案来解决这个难题。
对于那些拥有带有多个框架的“历史” HTML框架集的所有人,我想向您展示如何从原始PHP代码文件进行此转换。非常感谢我个人能够在堆栈溢出时收集到的所有专业建议,我想在这里退还一些东西。
基本布局结构如下:
+---------------------------------------------------------+
| (1) |
+---------------------------------------------------------+
| (2) |
+---------------------------------------------------------+
| (3) | frameBody | (4) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+---------------------------------------------------------+
| (5) |
+---------------------------------------------------------+
传奇:
(1)-headerTitle; (2)-frameMenu; (3)-userMenu; (4)-PatientMenu; (5)-footerTitle。
从login.php
成功登录后,我被转发到site.php
,后者负责整个网站。在此文件中,管理从条件切换到条件,从而切换到相应的其他PHP文件的所有条件。
site.php
不过也照顾网站的主要布局,这里采用的是旧的frameset / frame / noframes方式(请原谅代码示例的冗长性,但是我想向您展示如何做到这一点)简短且结构合理的iframe解决方案可以是)
<?php
// Lots of definitions and introductory stuff,not relevant here
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?= strtolower($CHARSET) ?>" />
<meta name="author" content="whoever" />
<meta name="date" content="<?= date('r',filectime($_SERVER['SCRIPT_FILENAME'])) ?>" />
<title><?= $sCompanyName ?></title>
</head>
<frameset name="alles" cols="20,*,20" framespacing="0" frameborder="0" border="0" />
<frameset rows="20,50,120,40,20" framespacing="0" frameborder="0" border="0" />
<frame name="headerTitle" src="frameHeader.php" scrolling="no" noresize="noresize" />
<frame name="frameMenu" src="frameMenu.php" scrolling="no" noresize="noresize" />
<?php
if (isset($_REQUEST['sBody']) && $_REQUEST['sBody'] == 'login')
echo '<frame name="frameBody" src="login.php' . $sLanguageString . '">';
else {
?>
<frameset name="Frame1" cols="225,1,225" framespacing="0" frameborder="0" border="0">
<frame name="userMenu" id="userMenu" src="userMenu.php" />
<frame name="frameBody" src="<?= $sBody . (strlen($sURLParameterString) > 1 ? $sURLParameterString : '') ?>" />
<frame name="patientMenu" id="patientMenu" src="patientMenu.php"/>
</frameset>
<frame name="footerTitle" src="frameFooter.php" scrolling="no" noresize="noresize" />
</frameset>
<?php
}
?>
<noframes>
<body>
<?php
setSysMsg($oSysMsg->getExpression('general','noFrameSupport','This site is based on frames. But your browser doesn\'t support frames.<br />Your should choose another internet browser.'));
echo getLastSysMsg();
?>
</body>
</noframes>
</frameset>
</html>
现在容易进行转换的障碍是什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)