- utiliser un chemin relatif ds le include
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questioninclude 'admin/mon_fichier_a_inclure.php';
c'est une erreur de configuration de apache
<?php include 'admin/mon_fichier_a_inclure.php' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/style.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/speedbarre.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/forum.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/news.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/form.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/mp.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/webcode.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/tutoriel.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/script.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/livreor.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/profil.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $base;?>/css/style_script.css" /> <?php //Maintenant on se connecte à la base de données include("identifiants.php"); mysql_connect($adresse, $nom, $motdepasse); mysql_select_db($database); include'functions.php'; include"$base/scode/scode.php"; include'webcode.php'; //Récupération des variables de configuration $recup = mysql_query('SELECT * FROM forum_config'); $config = array(); while($data_recup = mysql_fetch_assoc($recup)) { $config[$data_recup['config_nom']] = $data_recup['config_valeur']; } etc... ?>
[..]est donc dans le dossier "admin" le chemin ne ce fait pas
include '../includes/debut.php';
<?php include '../includes/debut.php'; ?>
<?php $fichier_trouve = 'index.php'; if (file_exists($fichier_trouve)) { include"code/code.php"; } else { include"../code/code.php"; } ?>