查找由php函数创建的页面

查找由php函数创建的页面,php,html,Php,Html,我正在尝试使用在另一个页面的表单中收集的数据生成一个HTML页面。我在html页面上有以下标签: <html> <body> <meta http-equiv="cache-control" content="private" > <link rel="stylesheet" type="type/css" href="vytran_css.css" /> <head> New Product Introduction <

我正在尝试使用在另一个页面的表单中收集的数据生成一个HTML页面。我在html页面上有以下标签:

<html>
<body>

<meta http-equiv="cache-control" content="private" > 
<link rel="stylesheet" type="type/css" href="vytran_css.css" />


<head> New Product Introduction </head>

<p> In order to begin the process of introducing a new product, please complete
the following form. Once you are satisfied with your responses to the various 
prompts, please click on the submit button at the bottom of the page. If you 
would like to start over, click the Reset button. If you have any questions, 
Please follow the link that says "Help".


<form action="html_data.php" id=from1 method="post"> 
Product Name: 
<input name="Name" size="20" type="text">
<br><br>

Project Lead Name:
<input name="PLname" size="20" type="text"> <br><br>

Team-members: <br>
<textarea name="Team-members" rows=10 cols=40 type="text"> </textarea> <br><br>

Product Type: <br>
<input name="Product Type" size="20" type="text"> <br><br>

Description: <br>
<textarea name="Description" rows=10 cols=40 type="text"> </textarea>
<br>

<br> <br>



<input value="Submit" type="submit" name="formSubmit">
<input value="Reset" type="reset">
<input value="Help" type="button" onclick="window.location.href='problems.html'">
</form>
</p>

</body>
</html>

新产品介绍
为了开始介绍新产品的过程,请填写
以下是表格。一旦您对各种问题的回答感到满意
提示,请点击页面底部的提交按钮。如果你
要重新开始,请单击“重置”按钮。如果你有任何问题,
请点击“帮助”链接。
产品名称:


项目负责人姓名:

团队成员:


产品类型:


说明:



在html_data.php页面上,我有以下内容:

<?php 
    ob_start(); // start trapping output 
    $name = @$_POST['Name']; 
?> 
<html> 
<body> 
<p> 
Product Name: <?php echo $Name; ?><br> 
Project Lead: <?php echo $PLname; ?><br> 
Team Members: <?php echo $Team-members; ?><br> 
Description: <?php echo $Description; ?> 
</p> 
</body> 
</html> 
<?php 
    $output = ob_get_contents();  
    $newfile="output.txt";  
    $file = fopen ($newfile, "w");  
    fwrite($file, $output);  
    fclose ($file);   
    ob_end_clean();  
?> 


产品名称:
项目负责人:
团队成员:
说明:


这应该符合我的要求。表单提交时没有问题,但提交后我找不到页面。你知道我需要改变什么吗?

以你的形式

在您的html_data.php中

显然,团队和成员之间的短跑存在问题

  • PHP将连字符视为一种数学运算,即负号

  • 即:团队减去成员

然后,如果您希望在提交后
将数据回显到屏幕,请添加

echo $output;
下面
ob_end_clean()


这对我很有效。

你找不到页面是什么意思?它不会显示在浏览器中吗?您使用的是什么web服务器?当您说“一旦提交,我就找不到页面”时,您是什么意思?你说表格提交没有问题。你是说你要写的文件?你不知道它的名字?它是
output.txt
.hmm$name和'name',两个表单嵌套,这是你的代码吗?@ChelseaCerame:你到底有什么问题?你找不到什么?你在找什么?你在做什么?我测试了你的表单,它为
$团队成员生成了
0
(零)。对于这两个实例,我都将其重命名为
$Team_members
,并且它正确地创建了条目。这些是我到目前为止的发现。有效的变量名以字母或下划线开头,后跟任意数量的字母、数字或下划线。变量名中不允许使用连字符。样式设置:如果要将
附加到文件中,请使用
A+
指令。另外,如果您希望添加一些样式,请使用
.shtml
.php
扩展名命名您的文件,并将
include
文件直接放在顶部,例如
php
等效文件,并在其中放入您希望显示的任何样式内容或附加标题。