par
karvboy » 07 sept. 2006, 07:11
Salut.
Récément, les liens de mon site codé avec des bases PHP a cessé de fonctionné. Sinon, il a fonctionné correctement durant plus de 2 ans et le code n'avait pas été ré-édité depuis.
Ici j'ai attaché un exemple de code que j'utilise. J'ai tout condensé:
Est-ce que quelqu'un pourrait tester sur un serveur et m'indiquer pourquoi les liens ne marchent plus correctement?
mais bref, le ficher index ressemble à ceci;
Code : Tout sélectionner
<!------------------------>
<!- METAS ->
<!------------------------>
<html>
<head>
<meta http-equiv="Content-Language" content="fr-ca">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testing PHP links</title>
</head>
<body>
<!--------------------------->
<!- INITIALIZATION (PHP) --->
<!--------------------------->
<?php
// language by default
$lang = ($lang) ? $lang : "en";
// page by default
$page = ($page) ? $page : "news";
?>
<!------------------------>
<!- LANGUAGE SELECTION ->
<!------------------------>
<table border="1" cellpadding="3" cellspacing="4" width="26%" bordercolor="#666666">
<tr>
<td width="50%" bgcolor="#666666" align="center"> <?php echo "<a href=\"index.php?lang=".en."\">"; ?> English </a> </td>
<td width="50%" bgcolor="#666666" align="center"> <?php echo "<a href=\"index.php?lang=".fr."\">"; ?> French </a> </td>
</tr>
</table>
<!------------------------>
<!- MAIN STUFF ->
<!------------------------>
<br><br>
<table border="1" cellpadding="3" cellspacing="4" width="600" bordercolor="#666666">
<tr>
<td colspan="3"><? include ("$lang/$page.txt") ?></td>
</tr>
</table>
</body>
</html>
Salut.
Récément, les liens de mon site codé avec des bases PHP a cessé de fonctionné. Sinon, il a fonctionné correctement durant plus de 2 ans et le code n'avait pas été ré-édité depuis.
Ici j'ai attaché un exemple de code que j'utilise. J'ai tout condensé:
Est-ce que quelqu'un pourrait tester sur un serveur et m'indiquer pourquoi les liens ne marchent plus correctement?
mais bref, le ficher index ressemble à ceci;
[code]<!------------------------>
<!- METAS ->
<!------------------------>
<html>
<head>
<meta http-equiv="Content-Language" content="fr-ca">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testing PHP links</title>
</head>
<body>
<!--------------------------->
<!- INITIALIZATION (PHP) --->
<!--------------------------->
<?php
// language by default
$lang = ($lang) ? $lang : "en";
// page by default
$page = ($page) ? $page : "news";
?>
<!------------------------>
<!- LANGUAGE SELECTION ->
<!------------------------>
<table border="1" cellpadding="3" cellspacing="4" width="26%" bordercolor="#666666">
<tr>
<td width="50%" bgcolor="#666666" align="center"> <?php echo "<a href=\"index.php?lang=".en."\">"; ?> English </a> </td>
<td width="50%" bgcolor="#666666" align="center"> <?php echo "<a href=\"index.php?lang=".fr."\">"; ?> French </a> </td>
</tr>
</table>
<!------------------------>
<!- MAIN STUFF ->
<!------------------------>
<br><br>
<table border="1" cellpadding="3" cellspacing="4" width="600" bordercolor="#666666">
<tr>
<td colspan="3"><? include ("$lang/$page.txt") ?></td>
</tr>
</table>
</body>
</html>[/code]