当前位置:Gxlcms > 数据库问题 > 单台机器上php HTTP MySQL 组合之脚本测试

单台机器上php HTTP MySQL 组合之脚本测试

时间:2021-07-01 10:21:17 帮助过:24人阅读

单台机器上php HTTP MySQL 组合
[root@wanghua html]# pwd
/var/www/html
[root@wanghua html]# ls
html.php
[root@wanghua html]# cat html.php # DocumentRoot 下以 .php 结尾
<html>
<title> this is php page </title>
<body>
<?php
phpinfo();
?>
</body>
</html>

测试脚本mysql连接PHP
[root@wanghua html]# ls
html.php php-mysql.php
[root@wanghua html]# cat php-mysql.php
<?php
$conn=mysql_connect(‘localhost‘,‘root‘,‘‘);
if ($conn)
echo "ok";
else
echo "flase";
?>

单台机器上php HTTP MySQL 组合之脚本测试

标签:page   www   root   this   else   nec   ase   echo   body   

人气教程排行