Include php problem

badboys54 -  
 badboys54 -
Bonjour,
j'ai un probleme avec la fonction include dans mon code php . je suis en train de lire le tuto sur le site du zero pour crée un forum et sa m'affiche que des erreur avec le include alors qui y a quelque ligne

mon code de la page index.php
wcode>
<?php
//Cette fonction doit être appelée avant tout code html
session_start();

//On donne ensuite un titre à la page, puis on appelle notre fichier debut.php
$titre = "Index du forum";
include("includes/debut.php");
?>
<body>
<div id="banniere"></div>
<?php
//Maintenant, on se connecte à la base de données
include("includes/identifiants.php");
mysql_connect($adresse, $nom, $motdepasse);
mysql_select_db($database);
?>
</code>
de la page debut.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>
<?php
if (!empty($titre)) //Si le titre est indiqué, on l'affiche entre les balises <title>
{
    echo '<title> '.$titre.' </title>';
}
else //Sinon, on écrit forum par défaut
{
    echo '<title> Forum </title>';
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="./css/design.css" />
</head>


et de la page identifiant.php
<?php
//identifiants
$adresse = "localhost";
$nom = "root";
$motdepasse = "";
$database = "teste";
?>



merci
A voir également:

2 réponses

badboys54
 
non c'est bon
0
badboys54
 
j'au un autre probleme sa me mais erreur '>' et voila le script c'est la premier ligne
<script>// c'est cette la 
function bbcode(bbdebut, bbfin)
{
var input = window.document.formulaire.message;
input.focus();
if(typeof document.selection != 'undefined')
{
var range = document.selection.createRange();
var insText = range.text;
range.text = bbdebut + insText + bbfin;
range = document.selection.createRange();
if (insText.length == 0)
{
range.move('character', -bbfin.length);
}
else
{
range.moveStart('character', bbdebut.length + insText.length + bbfin.length);
}
range.select();
}
else if(typeof input.selectionStart != 'undefined')
{
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + bbdebut + insText + bbfin + input.value.substr(end);
var pos;
if (insText.length == 0)
{
pos = start + bbdebut.length;
}
else
{
pos = start + bbdebut.length + insText.length + bbfin.length;
}
input.selectionStart = pos;
input.selectionEnd = pos;
}
 
else
{
var pos;
var re = new RegExp('^[0-9]{0,3}$');
while(!re.test(pos))
{
pos = prompt("insertion (0.." + input.value.length + "):", "0");
}
if(pos > input.value.length)
{
pos = input.value.length;
}
var insText = prompt("Veuillez taper le texte");
input.value = input.value.substr(0, pos) + bbdebut + insText + bbfin + input.value.substr(pos);
}
}
function smilies(img)
{
window.document.formulaire.message.value += '' + img + '';
}
</script>

merci
0