我需要知道确切版本PHP&用于magento安装检查的MySQL
我从这里获得MySQl版本:
//Test What Exact Version PHP & MySQL
echo "<h2>Exact Version PHP & MySQL: </h2>";
$mysql = mysqli_connect('localhost', 'root', '');
/* Test the MySQL connection */
if (mysqli_connect_errno()) {
printf("Connection failed: %s\n", mysqli_connect_error());
exit();
}
/* Print the MySQL server version */
printf("MySQL server version: %s\n", mysqli_get_server_info($mysql));
/* Close the MySQL connection */
mysqli_close($mysql);
但我怎样才能获得精确的PHP版本
答案 0 :(得分:0)
php中有两个函数可以获得PHP和MySql的确切版本。
对于PHP版本
phpversion();
对于MySql版本
mysql_get_server_info();
价: