mirror of
https://github.com/php/php-src.git
synced 2024-10-19 23:44:13 +00:00
26 lines
666 B
PHP
26 lines
666 B
PHP
<?php
|
|
|
|
/* default values are localhost, root and empty password
|
|
Change the values if you use another configuration */
|
|
$driver = new mysqli_driver;
|
|
|
|
if (!$driver->embedded) {
|
|
$host = "localhost";
|
|
$user = "root";
|
|
$passwd = "";
|
|
} else {
|
|
$path = dirname(__FILE__);
|
|
$host = ":embedded";
|
|
$user = $passwd = NULL;
|
|
$args = array(
|
|
"--datadir=$path",
|
|
"--innodb_data_home_dir=$path",
|
|
"--innodb_data_file_path=ibdata1:10M:autoextend",
|
|
"--log-error=$path/testrun.log",
|
|
"--init-connect='CREATE DATABASE IF NOT EXISTS test;'"
|
|
);
|
|
$driver->embedded_server_start(TRUE, $args, NULL);
|
|
}
|
|
|
|
?>
|