Skip to content

Commit

Permalink
Merge pull request #23 from ccloquet/feature/config_files
Browse files Browse the repository at this point in the history
Add a config file per environement
  • Loading branch information
ccloquet authored Nov 16, 2018
2 parents f2fe0cd + 62d5535 commit 226d106
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 8 additions & 0 deletions config/params.dev.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

define('BASE_URL', 'https://****/index.html'); // URL OF THE CLIENT PAGE
define('BASE_FOLDER', '../received/'); // FOLDER WHERE THE IMAGES ARE STORED

$params = array_merge($params, [
1 => ['secret'=> 'azerty', 'name'=> 'test user', 'sms_apikey' => '']
]);
10 changes: 4 additions & 6 deletions config/params.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

define('BASE_URL', 'https://****/index.html'); // URL OF THE CLIENT PAGE
define('BASE_FOLDER', '../received/'); // FOLDER WHERE THE IMAGES ARE STORED

define('ENV', 'dev');

$params = [
// userids (confidential) // secret -- allow to authentify that the link sent by SMS comes from this server
'' => ['secret'=> '', 'name'=> '', 'sms_apikey' => '']
// '' => ['secret'=> '', 'name'=> '', 'sms_apikey' => '']
];

?>

require_once ('params.'.ENV.'.php');
2 changes: 1 addition & 1 deletion html/params.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var upload_path = 'https://****/php/upload.php' // PATH TO UPLOAD THE PICTURES
var upload_path = 'https://****/php/upload.php'; // PATH TO UPLOAD THE PICTURES

0 comments on commit 226d106

Please sign in to comment.