gpt4 book ai didi

php - HTML 无法在 Internet 上正确加载,但在 Dreamweaver 上可以正常加载

转载 作者:行者123 更新时间:2023-11-28 01:16:25 25 4
gpt4 key购买 nike

我正在使用 Adob​​e Dreamweaver 使用 php 和 html 制作一个网站,由“000webhost.com”免费托管。因此,在我的一个页面中,特别是我的“inventory_list.php”页面中,我有一个包含输入字段的表格。

在 Dreamweaver 上看起来像这样: enter image description here

但是当我在 Internet 上加载它时,它看起来像这样: enter image description here

放大: enter image description here

它不显示表格的其余部分和页面的其余部分。

这是我的 inventory_list.php:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Inventory List</title>
<link rel="stylesheet" href="../style/style.css" type="text/css" media="screen" />
</head>

<body>
<div align="center" id="mainWrapper">
<?php include_once("../template_header.php");?>
<div id="pageContent"><br/>

<div align = "right" style="margin-right:32px;"><a href="#inventory_list.php#inventoryForm">+ Add New T-Shirt</a></div>
<div align="left"style="margin-left:24px">
<h2>Inventory List</h2>
<?php echo $product_list; ?>
<p></p>
</div>
<a name="inventorForm" id="inventoryForm"></a>
<h3>Add New Inventory Form</h3>


<form action="inventory_list.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post">
<table width="646" border="1">
<tbody>
<tr>
<td width="131">Product Name &nbsp;</td>
<td width="339"><label><input name="product_name" type="text" id="prdouct_name" size="60"/>&nbsp;</label></td>
</tr>
<tr>
<td>Product Price &nbsp;</td>
<td><label>Php&nbsp;<input name="productPrice" type="text" id="productPrice" size="20"/>&nbsp;</label></td>
</tr>
<tr>
<td>Category &nbsp;</td>
<td><label><select name="category" id="category">
<option value=""></option>
<option value="NBA">NBA</option>
<option value="PBA">PBA</option>
</select></label></td>
</tr>
<tr>
<td>Size</td>
<td><label><select name="size" id="size">
<option value=""></option>
<option value="small">S</option>
<option value="medium">M</option>
<option value="large">L</option>
</select></label></td>
</tr>
<tr>
<td>Product Details&nbsp;</td>
<td><label><textarea name="productDetails" type="textarea" id="productDetails" cols="64" rows="5"/></label></td>
</tr>
<tr>
<td>Product Image&nbsp;</td>
<td><label><input type="file" name = "fileField" id="fileField" />&nbsp;</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label><input type="submit" name="button" id="button" value="Add this item now"/></label></td>
</tr>

</tbody>
</table>
</form>


<br />
<br />
<br />

</div>


<div>


</div>

</div>
</body>
</html>

它在 Dreamweaver 上正常显示时不显示在文本区域之后。抱歉,我不得不在这里提出这样的问题,但我们的进度演示将在明天进行,我需要继续编码。非常感谢所有帮助 :)

最佳答案

您没有正确关闭 <textarea> .你让它自动关闭( <textarea /> )而不是 </textarea>

您在下面修改后的代码,带有 live fiddle here

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Inventory List</title>
<link rel="stylesheet" href="../style/style.css" type="text/css" media="screen" />
</head>

<body>
<div align="center" id="mainWrapper">
<?php include_once("../template_header.php");?>
<div id="pageContent"><br/>
<div align="center" id="mainWrapper">
<?php include_once("../template_header.php");?>
<div id="pageContent"><br/>

<div align = "right" style="margin-right:32px;"><a href="#inventory_list.php#inventoryForm">+ Add New T-Shirt</a></div>
<div align="left"style="margin-left:24px">
<h2>Inventory List</h2>
<?php echo $product_list; ?>
<p></p>
</div>
<a name="inventorForm" id="inventoryForm"></a>
<h3>Add New Inventory Form</h3>


<form action="inventory_list.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post">
<table width="646" border="1">
<tbody>
<tr>
<td width="131">Product Name &nbsp;</td>
<td width="339"><label><input name="product_name" type="text" id="prdouct_name" size="60"/>&nbsp;</label></td>
</tr>
<tr>
<td>Product Price &nbsp;</td>
<td><label>Php&nbsp;<input name="productPrice" type="text" id="productPrice" size="20"/>&nbsp;</label></td>
</tr>
<tr>
<td>Category &nbsp;</td>
<td><label><select name="category" id="category">
<option value=""></option>
<option value="NBA">NBA</option>
<option value="PBA">PBA</option>
</select></label></td>
</tr>
<tr>
<td>Size</td>
<td><label><select name="size" id="size">
<option value=""></option>
<option value="small">S</option>
<option value="medium">M</option>
<option value="large">L</option>
</select></label></td>
</tr>
<tr>
<td>Product Details&nbsp;</td>
<td><label><textarea name="productDetails" type="textarea" id="productDetails" cols="64" rows="5"></textarea></label></td>
</tr>
<tr>
<td>Product Image&nbsp;</td>
<td><label><input type="file" name = "fileField" id="fileField" />&nbsp;</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label><input type="submit" name="button" id="button" value="Add this item now"/></label></td>
</tr>

</tbody>
</table>
</form>


<br />
<br />
<br />

</div>


<div>


</div>

</div>
</body>
</html>

关于php - HTML 无法在 Internet 上正确加载,但在 Dreamweaver 上可以正常加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35555352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com