Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1017 Bytes

File metadata and controls

23 lines (19 loc) · 1017 Bytes

DisCoding project

Setup

  1. You have to use a local server such as Wamp or Mamp
  2. Pull the repo in the www/ directory of your local server
  3. Import discoding.sql in your database
  4. Follow the address of your repo. For example, if your repo is in www/discoding/, the URL should be http://127.0.0.1/discoding

Database

You can configure your database access in the file src/model/database.php. Simply update the default values in the init_db() function:

$host = $_ENV['DISCODING_DB_HOST'] ?? 'localhost';
$dbname = $_ENV['DISCODING_DB_NAME'] ?? 'discoding';
$charset = $_ENV['DISCODING_DB_CHARSET'] ?? 'utf8';
$user = $_ENV['DISCODING_DB_USER'] ?? 'root';
$password = $_ENV['DISCODING_DB_PASSWORD'] ?? '';

For example, if you want to change the database password with "mypassword", update the $password variable:

$password = $_ENV['DISCODING_DB_PASSWORD'] ?? 'mypassword'; // just update at the right side of the ??