其实,我觉得,首要的是建议楼主今后贴代码的时候把用户名密码地方隐掉---C:\>cd mysql\binC:\mysql\bin>mysql -h 61.185.204.21 -u root -p Enter password: ******* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9838 to server version: 3.23.52-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> show databases; +----------+ | Database | +----------+ | company | | lyb | | mysql | | test | +----------+ 4 rows in set (0.08 sec)mysql> use company Database changed mysql> show tables; +-------------------+ | Tables_in_company | +-------------------+ | khfk | | zxdd | +-------------------+ 2 rows in set (0.08 sec)mysql>
$rs['name']...
这样来取出显示
$name 改为 $rs['name']
$email 改为 $rs['email']
$$company 改为 $rs['company']
$content 改为 $rs['content']
echo "abc".$rs['name']."ddd".$rs['email'];
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9838 to server version: 3.23.52-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> show databases;
+----------+
| Database |
+----------+
| company |
| lyb |
| mysql |
| test |
+----------+
4 rows in set (0.08 sec)mysql> use company
Database changed
mysql> show tables;
+-------------------+
| Tables_in_company |
+-------------------+
| khfk |
| zxdd |
+-------------------+
2 rows in set (0.08 sec)mysql>
$db=@mysql_connect('61.185.204.21','root','ahuasky')
暴露了你数据库的地址,用户名,密码今后贴代码的时候把用户名密码地方隐掉