第一个问题 你没有说清楚,也没有给出代码。无从回答第二个问题把"未登陆";"高级";"欢迎";分别导入一个文件代码
<?php
if(!isset($_SESSION['levalSession']))
{
include "未登陆";
}
elseif($_SESSION['levalSession']>2)
{
include "高级";
}
elseif($_SESSION['levalSession']>1)
{
include "欢迎";
}
?>
<?php
if(!isset($_SESSION['levalSession']))
{
include "未登陆";
}
elseif($_SESSION['levalSession']>2)
{
include "高级";
}
elseif($_SESSION['levalSession']>1)
{
include "欢迎";
}
?>
if(!isset($_SESSION['levalSession']))
{
echo "<table width="280" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="280" height="49"> </td>
</tr>
</table>";
}
elseif($_SESSION['levalSession']>2)
{
echo "<a href='hign.php'>高级</a>";
}
elseif($_SESSION['levalSession']>1)
{
echo "<a href='welcome.php'>欢迎</a>";
}
?>
{
$html = <<<EOD
<table width="280" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="280" height="49"> </td>
</tr>
</table>
EOD;
echo $html;
}
$param = <<<标识符
.......
HTML代码
.......
标识符;注意,最后一个标识符前面不许有空格和其他字符。
例如<?php echo $row_rsUserDetails['Name_us']; ?>要在表格内加上这段代码.
请大家再帮忙看看怎么写代码才能运行谢谢
例如<?php echo $row_rsUserDetails['Name_us']; ?>要在表格内加上这段代码.
请大家再帮忙看看怎么写代码才能运行谢谢
<table><tr><td> <?php echo $row_rsUserDetails['Name_us']; ?></td></tr><table>如果如上的话就 :
<?php
if(!isset($_SESSION['levalSession']))
{
echo "<table width='280' border='0' cellpadding='0' cellspacing='0'>
<!--DWLayoutTable-->
<tr>
<td width='280' height='49'>".$row_rsUserDetails['Name_us']."</td>
</tr>
</table>";
}
…………?>
就是用 .号分离开。
<?php
$i=1;
if(!isset($_SESSION['levalSession']))
{
echo "<table width='280' border='1' cellpadding='0' cellspacing='0'>
<!--DWLayoutTable-->
<tr>
<td width='280' height='49'>".$i."</td>
</tr>
</table>";
}
?>
你不会把省略号照写吧
还有变量要定义撒!
{
$html = <<<EOD
<table width="280" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="280" height="49">{$row_rsUserDetails['Name_us']}</td>
</tr>
</table>
EOD;
echo $html;
}======================如果加入的是数组,要加一个{}号。
if(!isset($_SESSION['levalSession']))
{
echo "<table width="280" border="0" cellpadding="0" cellspacing="0" bgcolor="#f1f1f1">
<!--DWLayoutTable-->
<tr>
<td width="92" height="26" valign="top"><img src="images/dl.gif" width="92" height="26"></td>
<td colspan="2" valign="bottom" background="images/background_tab.gif"><a href="cn/index/log/member.php"></a>你好,".$row_rsUserDetails['Name_us']."♀ </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="18" colspan="2" valign="top"><font size="2">☉ <a href="cn/index/kill.php">退出登陆</a></font></td>
<td width="140" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="18" colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top">☉ <a href="cn/index/cxfw.php">申请诚信服务</a></td>
</tr>
<tr>
<td height="42"></td>
<td width="48"></td>
<td></td>
</tr>
</table>";
}
?>
if(!isset($_SESSION['levalSession']))
{
echo <<< HTML
<table width="280" border="0" cellpadding="0" cellspacing="0" bgcolor="#f1f1f1">
<!--DWLayoutTable-->
<tr>
<td width="92" height="26" valign="top"><img src="images/dl.gif" width="92" height="26"></td>
<td colspan="2" valign="bottom" background="images/background_tab.gif"><a href="cn/index/log/member.php"></a>你好,{$row_rsUserDetails['Name_us']}♀ </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="18" colspan="2" valign="top"><font size="2">☉ <a href="cn/index/kill.php">退出登陆</a></font></td>
<td width="140" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="18" colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top">☉ <a href="cn/index/cxfw.php">申请诚信服务</a></td>
</tr>
<tr>
<td height="42"></td>
<td width="48"></td>
<td></td>
</tr>
</table>
HTML;
}
?>
if(!isset($_SESSION['levalSession']))
{
?>
echo "未登陆";
<?php } ?>
<?php
elseif($_SESSION['levalSession']>2)
{
?> echo "高级";
<?php }
elseif($_SESSION['levalSession']>1)
{
?>
echo "欢迎";
<?php
}
?>