Skip to content

ec-code-2021-discoding-php-PaulMarechal created by GitHub Classroom

Notifications You must be signed in to change notification settings

PaulMarechal/ec-code-2021-discoding-php-PaulMarechal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ??

About

ec-code-2021-discoding-php-PaulMarechal created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published