index.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. # ***** BEGIN LICENSE BLOCK *****
  3. # This file is part of DotClear.
  4. # Copyright (c) 2004 Olivier Meunier and contributors. All rights
  5. # reserved.
  6. #
  7. # DotClear is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # DotClear is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with DotClear; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. #
  21. # ***** END LICENSE BLOCK *****
  22. # Chemin vers la racine de l'application (si vous changer le fichier de place)
  23. $app_path = '/';
  24. # Si par exemple vous mettez blog.php à la racine de votre site et que DotClear
  25. # se trouve dans /dotclear vous pouvez décommenter cette ligne :
  26. //$app_path = '/dotclear/';
  27. # NE RIEN CHANGER APRES CETTE LIGNE
  28. $blog_file_path = __FILE__;
  29. $blog_dc_path = dirname(__FILE__).$app_path;
  30. require $blog_dc_path.'/layout/prepend.php';
  31. # En-têtes et prologue
  32. # Envoie des en-tête HTTP
  33. $accept_xml =
  34. !empty($_SERVER['HTTP_ACCEPT']) &&
  35. strpos($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') !== false;
  36. if (dc_send_real_xml && $accept_xml) {
  37. header('Content-Type: application/xhtml+xml');
  38. } else {
  39. header('Content-Type: text/html; charset='.dc_encoding);
  40. }
  41. if ($accept_xml) {
  42. echo '<?xml version="1.0" encoding="'.dc_encoding.'"?>'."\n";
  43. }
  44. # Affichage de la page
  45. //if (function_exists('ob_start')) {
  46. // ob_start();
  47. //}
  48. //if (defined('DC_CACHE_CONTENT')) {
  49. // echo DC_CACHE_CONTENT;
  50. //} else {
  51. include $dc_template_file;
  52. //}
  53. require $blog_dc_path.'/layout/append.php';
  54. //if (function_exists('ob_start')) {
  55. // $p_content = ob_get_contents();
  56. // ob_end_clean();
  57. //
  58. // echo $p_content;
  59. //
  60. // if (defined('DC_CACHE_FILE')) {
  61. // cache::writeFile(DC_CACHE_FILE,$p_content);
  62. // }
  63. //}
  64. ?>