Skip to content

Commit

Permalink
Merge pull request #62 from croftman/master
Browse files Browse the repository at this point in the history
Ajout d'une constante en cas de vhost ainsi que le port http
  • Loading branch information
RaspbianFrance authored Nov 29, 2017
2 parents b5858ab + 9fee045 commit 89e25c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mvc/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
*/

//On définit les chemins
define('PWD', '/var/www/RaspiSMS/'); //On défini le chemin de base du site
define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . '/RaspiSMS/'); //On défini l'adresse url du site
define('PWD', '/var/www/html/RaspiSMS/'); //On définit le chemin de base du site
define('HTTP_ROOT', '/RaspiSMS/'); //On définit la racine d'accès (selon nore vhost)
define('HTTP_PORT', '80'); //On définit le port sur lequel est raspisms
define('HTTP_PWD', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') . ( ((HTTP_PORT != 443 AND isset($_SERVER['HTTPS'])) OR (HTTP_PORT != 80 AND !isset($_SERVER['HTTPS']))) ? ':'. HTTP_PORT : '') . HTTP_ROOT); //On défini l'adresse url du site

define('PWD_IMG', PWD . 'img/'); //Chemin dossier des images
define('HTTP_PWD_IMG', HTTP_PWD . 'img/'); //URL dossier des images
Expand Down

0 comments on commit 89e25c5

Please sign in to comment.