PHP gets the sample code for version information of php mysql apche

  • 2020-12-10 00:39:27
  • OfStack

Get the version of PHP directly
 
<?php 
echo "PHP Software version :".phpversion(); 
?> 

Get the MYSQL version directly
 
<?php 
mysql_connect('127.0.0.1','root',''); 
echo mysql_get_server_info(); 
?> 

Get the Apache version directly
 
<?php 
$version=apache_get_version(); 
echo "$version"; 
?> 

Related articles: