1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| /*** define the site path ***/
$site_path = realpath(dirname(__FILE__));
define('__SITE_PATH', $site_path);
// voila mon problème
define('MAIN_CSS', __SITE_PATH. '/src/css/default.css');
le style ne s'affiche pas dans firefox mais dans eclipse ! c'est bizard !
//ca me retourne un chemin du genre:
C:\xampp\htdocs\monprojet/src/css/default.css"
// ca ca marche mais bon c'est pas fiable je pense
// selon si je suis en dev ou en prod
define('MAIN_CSS', 'http://' .$_SERVER['HTTP_HOST'] . substr($_SERVER['REQUEST_URI'], 0, 18) .'src/css/default.css'); |
Partager