Rev 1647 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* Contient les fonctions PHP communes à PictoFlora et IdentiPlante.
*
*/
$cheminConfig = 'config/config.php';
$configOk = file_exists($cheminConfig);
if ($configOk) {
require $cheminConfig;
}
function getUrlPageCourante() {
$cheminUrl = $_SERVER['REQUEST_URI'];
$positionIntero = strpos($_SERVER['REQUEST_URI'], '?');
if ($positionIntero !== false) {
$cheminUrl = substr($_SERVER['REQUEST_URI'], 0, $positionIntero);
}
// ATTENTION : gwt.codesvr est transformé par PHP en gwt_codesvr
if (array_key_exists('gwt_codesvr', $_GET)) {
$cheminUrl .= '?gwt.codesvr='.$_GET['gwt_codesvr'];
}
$url = 'http://'.$_SERVER['SERVER_NAME'].$cheminUrl;
return $url;
}
?>