在php列表

时间:2016-03-14 20:54:53

标签: php html

我从这里得到了一些用户的帮助,创建了一个网站,为我的工厂的厨师为菜单创建一个模板。除了当他试图输入多行项目时,这一切都很有效。

Example:
Main Item
Side 1
Side 2

Comes out as:
Main Item Side 1 Side 2

这是我正在使用的脚本:

<html>
<head>
<title>GCH Cafe Menu</title>

<style>
.menu {
background: url(bg2.jpg);
width: 1024;
height: 768;
padding: 20px 570px 50px 50px;
box-sizing: border-box;
margin: 0 auto;
}

.menu h2 {
 font-size: 18px;
}


<?php
$MessageMonday = $_POST['MessageMonday'];
$MessageTuesday = $_POST['MessageTuesday'];
$MessageWednesday= $_POST['MessageWednesday'];
$MessageThursday = $_POST['MessageThursday'];
$MessageFriday = $_POST['MessageFriday'];

ob_start();
?>


</style>
</head>

<body>
<div style="height: 768px" class="menu">
<br />
<h2><center><font size="24">GCH Cafe Menu</font></center></h2>
<br />
<p><h2><font face="lucida calligraphy"><u>Monday</h2></u></font></p>
<div> <?php echo $MessageMonday; ?></div>
<br />


<p><h2><font face="lucida calligraphy"><u>Tuesday</h2></u></font></p>
<div> <?php echo $MessageTuesday; ?></div>
<br />


<p><h2><font face="lucida calligraphy"><u>Wednesday</h2></u></font></p>
<div> <?php echo $MessageWednesday; ?></div>
<br />


<p><h2><font face="lucida calligraphy"><u>Thursday</h2></u></font></p>
<div> <?php echo $MessageThursday; ?></div>
<br />


<p><h2><font face="lucida calligraphy"><u>Friday</h2></u></font></p>
<div><?php echo $MessageFriday; ?></div>
<br />

</body>
</html>

<?php
$html = ob_get_contents();
ob_end_clean();

$filename = "menu.html";

file_put_contents($filename, $html);

echo file_get_contents("menu.html");
?>

0 个答案:

没有答案