New WinNMP Project: tuyetvoi.vn

This is a new WinNMP Project
Feel free to modify / overwrite this file!
Read WinNMP Basic Usage - Getting Started


MySql Database Connection:

Success, MySql server version 5.5.5-10.4.12-MariaDB-log

			$conn=new mysqli('p:localhost');
			$conn->set_charset('utf8');
			$conn->select_db('mysql');
		

You don`t need to specify the mysql username/password, they are stored in php.ini. You could allso connect using:

			$DB_USER = 'root';	//ini_get('mysqli.default_user');
			$DB_PASS = '';		//ini_get('mysqli.default_pw');
			$dbh = new PDO('mysql:host=localhost;dbname=mysql', $DB_USER, $DB_PASS);
		

Redis Cache / NoSql Connection:

Success, Redis server version 4.0.14.1

			$redis=new Redis();
			$addr=empty($_SERVER['REDIS']) ? 'localhost' : $_SERVER['REDIS'];
			$redis->connect($addr);
		

Include Test:

Include path: .;c:/winnmp/include; Including a global library file:

Success, wtnmpIncludeTest.lib.php included

			include "tools/wtnmpIncludeTest.lib.php";