SHARE
TWEET

Impaginazione php

a guest Jun 25th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <? # Index.PHP
  2.  
  3. if(isset($_GET['page'])) {
  4.   $page = $_GET['page'];
  5. } else {
  6.   $page = "home";
  7. }
  8.  
  9. require("pages/header.php");
  10. require("pages/" . $page . ".php");
  11. require("pages/footer.php");
  12.  
  13. ?>
  14.  
  15. Dentro header.php avrai solo la parte di testa
  16. Dentro home.php / contattaci.php ecc avrai il resto delle pagine
  17. Dentro footer.php avrai solo la parte finale del template
  18.  
  19. Dopo di che le pagine saranno
  20.  
  21. www.dominio.it/index.php?page=home
  22. o ancora meglio
  23. www.dominio.it/?page=home
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top