测试PHP

WBOY
WBOYOriginal
2016-06-23 14:36:53924browse

为了测试PHP配置是否成功,可用下面的PHP代码测试

phpinfo()

?>

测试PHP是否能够连接MySQL,可用下面代码测试

$link=mysql_connect('localhost','root','123456');

if (!$link) echo "失败!";

else echo "成功!";

mysql_close();

?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:apache mod_fcgi phpNext article:php与apache