筆者搭建該平台時用的是phpstudy,估計wampserver和xmapp也適用
在瀏覽器進入sqli-labs時有以下提示
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in E:\phpstudy\PHPTutorial\WWW\sqli-labs-master\sql-connections\sql-connect.php:6Stack trace:#0 E:\phpstudy\PHPTutorial\WWW\sqli-labs-master\Less-1\index.php(15): include()#1 {main}thrown in E:\phpstudy\PHPTutorial\WWW\sqli-labs-master\sql-connections\sql-connect.php on line 6

2.解決方法
這個問題是PHP版本不兼容的緣故,可以通過把PHP版本換到5.x版本解決。
因為PHP5.x版本時,php連接Mysql數據庫會使用mysql_connect()連接,PHP7.x版本連接數據庫會使用mysqli_connect()連接,而GitHub上的源碼最近更新已經是五年前了,所以對PHP高版本會出現不兼容的情況。
