How to install sqli-labs into localhost

I use phpstudy to set a php+Mysql+Apache environment for the sqli-labs.
The first step is to download the sqli-labs-master.zip from the official website. (https://github.com/Audi-1/sqli-labs)
Then unzip it into the apache folder. I unzipped it into /phpstudy_pro/WWW
The second step is to modify the $dbpass and $host.
$dbpass is the password of MySQL connection and host is ur host. I use 127.0.0.1 as the host.
There's one thing that is important: the PHP version should be lower than php7. If you use the PHP which version higher than 7, then when you create the database, there will be errors: because of the files in sqli-labs-master use mysql_connection() but php7 use mysqli_connection().

Then open 127.0.0.1/sqli-labs-master in the browser and create the database. Successful!

posted @ 2020-11-23 16:10  ChristopherWu  阅读(42)  评论(0编辑  收藏  举报