我不明白为什么这不会运行 [英] i dont understand why this wont run
问题描述
表格是colunm被称为正文的表格
<?php //show_site.php
//此脚本从中检索博客条目数据库。
//地址错误处理。
ini_set(''display_errors'',1);
error_reporting(E_ALL & ~E_NOTICE);
//连接并选择。
if($ dbc = @mysql_connect(''localhost'',''username' ','''密码'')){
if(!@mysql_select_db(''username_tpp'')){
die(''< p>可以选择数据库,因为:< b>''。mysql_error()。
''< / b>< / p>'');
}
}否则{
die(''< p>无法连接到MySQL因为:< b>''。mysql_error() 。
''< / b>< / p>'');
}
{
if($ show = SELECT body from home;)
print"< p>< h3> {$ show}< / h3>
< / p>< hr /> \ n" ;;
}
mysql_close(); //关闭数据库连接。
?>
the table is head the colunm is called body
<?php //show_site.php
// This script retrieves blog entries from the database.
// Address error handing.
ini_set (''display_errors'', 1);
error_reporting (E_ALL & ~E_NOTICE);
// Connect and select.
if ($dbc = @mysql_connect (''localhost'', ''username'', ''password'')) {
if (!@mysql_select_db (''username_tpp'')) {
die (''<p>Could select the database because: <b>'' . mysql_error() .
''</b></p>'');
}
} else {
die (''<p>Could not connect to MySQL because: <b>'' . mysql_error() .
''</b></p>'');
}
{
if ($show = SELECT body from home;)
print "<p><h3>{$show}</h3>
</p><hr />\n";
}
mysql_close(); // Close the database connection.
?>
推荐答案
dbc = @mysql_connect('' localhost'',''username'',''password'')){
if(!@mysql_select_db(''username_tpp'')){
die(''< p>可以选择数据库,因为:< b>''。mysql_error()。
''< / b>< / p>'') ;
}
}否则{
die(''< p>无法连接到MySQL因为:< b>''。mysql_error()。
''< / b>< / p>'');
}
{
if(
dbc = @mysql_connect (''localhost'', ''username'', ''password'')) {
if (!@mysql_select_db (''username_tpp'')) {
die (''<p>Could select the database because: <b>'' . mysql_error() .
''</b></p>'');
}
} else {
die (''<p>Could not connect to MySQL because: <b>'' . mysql_error() .
''</b></p>'');
}
{
if (
show = SELECT body from home;)
print"< p>< ; h3> {
show = SELECT body from home;)
print "<p><h3>{
show}< / h3>
< / p>< hr /> \ n" ;;
}
mysql_close(); //关闭数据库连接。
?>
show}</h3>
</p><hr />\n";
}
mysql_close(); // Close the database connection.
?>
这篇关于我不明白为什么这不会运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!