<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Accueil VMS </title> <link href="menu/menu.css" rel="stylesheet" type="text/css" /> <link href="forme.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/repertoire/fichier.js"></script> <style type="text/css"></style> </head> <?php //include('menu/menu.html');?> [?page=1 liens1] [?page=2 liens2] [?page=3 liens3] [?page=4 liens4] [?page=5 liens5] <!-- ici tu dois avoir un include de la page --> <?php if(isset($_GET['page']) && is_numeric($_GET['page'])){ //(int) force la variable à être un nombre entier protection $page=(int)$_GET['page']; /*il faut un repertoire pages avec des pages numerotes page1.html,page2.html ...*/ $file='pages/page'.$page.'.html'; if(file_exists($file)){ include($file); }else{ //fichier absent } }else{ //erreur } ?> <?php //include('footpage.html'); ?> </html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>index</title> <style type="text/css"> <!-- #fond { position:absolute; width:1100px; height:900px; z-index:1; margin-left: auto; margin-right: auto; background-color: #CCFFFF; } #menu { position:absolute; width:200px; height:600px; z-index:1; top: 20px; background-color: #FFCCFF; left: 20px; } #contenu { position:absolute; width:800px; height:600px; z-index:2; left: 240px; top: 20px; background-color: #FFFF66; } --> </style> </head> [index.php?page=nouveautes test lien page 1] <?php if(isset($_GET['page']) && $_GET['page'] == 'accueil') require_once 'accueil.html'; elseif(isset($_GET['page']) && $_GET['page'] == 'nouveautes') require_once 'nouveautes.html'; else require_once 'autre_page.html'; ?> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>index</title> <style type="text/css"> <!-- #fond { position:absolute; width:1100px; height:900px; z-index:1; margin-left: auto; margin-right: auto; background-color: #CCFFFF; } #menu { position:absolute; width:200px; height:600px; z-index:1; top: 20px; background-color: #FFCCFF; left: 20px; } #contenu { position:absolute; width:800px; height:600px; z-index:2; left: 240px; top: 20px; background-color: #FFFF66; } --> </style> </head> [?page=1 liens1] <?php if(isset($_GET['page']) && is_numeric($_GET['page'])){ //(int) force la variable à être un nombre entier protection $page=(int)$_GET['page']; /*il faut un repertoire pages avec des pages numerotes page1.html,page2.html ...*/ $file='pages/page'.$page.'.html'; if(file_exists($file)){ include($file); }else{ //fichier absent } }else{ //erreur } ?> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Document sans titre</title> <style type="text/css"> <!-- #menu { position:absolute; width:200px; height:479px; z-index:1; left: 20px; top: 20px; } #contenu { position:absolute; width:800px; height:620px; z-index:2; left: 250px; top: 20px; overflow: scroll; } --> </style> </head> [?page=2 Suzuki 750 GSX-R] [?page=2 liens2] [?page=3 liens3] [?page=1 liens4] [?page=4 liens5] <?php if(isset($_GET['page']) && is_numeric($_GET['page'])){ //(int) force la variable à être un nombre entier protection $page=(int)$_GET['page']; /*il faut un repertoire pages avec des pages numerotes page1.html,page2.html ...*/ $file='pages/page'.$page.'.html'; if(file_exists($file)){ include($file); }else{ //fichier absent } }else{ //erreur } ?> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans titre</title> <style type="text/css"> <!-- #Layer1 { position:absolute; width:800px; height:1600px; z-index:1; left: 0; top: 0; background-color: #00FF33; } --> </style> </head> </html>