Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2009, 05:01
gomminola
 
Fecha de Ingreso: mayo-2008
Mensajes: 253
Antigüedad: 16 años
Puntos: 8
sesion_star()

Hola a tod@s, os explico tengo un codigo php de un ibro de visitas k encontre k es bastante bueno, pero me pasa lo siguiente desde mi web llamo al libro desde la funcion :

Código PHP:
<?include "libro.php"?>
y me sale este error k por mas vuelta k lo doy no doy con el error, dice esto:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/32/d247160154/htdocs/MIWEB/paginas/sabias/sabias.php:4) in /homepages/32/d247160154/htdocs/MIWEB/paginas/sabias/libro.php on line 95

¿puede ser por el include? dado que el libro lo he probado directamente y funciona de maravilla

El codgio del libro es este aunque es bastante largo asi que lo divido en 2 partes:
Código PHP:
<? 

  $title 
"";

  
$admin_password "contraseña";

  
$admin_email "[email protected]";

  
$home "http://www.tuweb.com";

  
$notify "NO";
//Your Operating System
//For Windows/NT user : WIN
//For Linux/Unix user : UNIX
  
$os "UNIX";
//Maximum entry per page when you view your guestbook
  
$max_entry_per_page 10;
//Name of file used to store your entry, change it if necessary
  
$data_file "ardgb18.dat";
//Maximum entry stored in data file
  
$max_record_in_data_file 300;

  
$max_entry_per_session 2;
  
$imgcode "YES";
//Color & font setting
  
$background "<a class=\"numPost\" href=\"/foros/PHP/34489#555555\">#555555</a>";
  
$table_top "#D3B68E";
  
$table_content_1a "#EDEEE8";
  
$table_content_1b "#E4E4E4";
  
$table_content_2a "#FFF8F0";
  
$table_content_2b "#FFEFDF";
  
$table_bottom "#D3B68E";
  
$table_border "<a class=\"numPost\" href=\"/foros/PHP/34489#000000\">#000000</a>";
  
$title_color "#FFFF00";
  
$link "<a class=\"numPost\" href=\"/foros/PHP/34489#0000\">#0000</a>FF";
  
$visited_link "<a class=\"numPost\" href=\"/foros/PHP/34489#0000\">#0000</a>FF";
  
$active_link "#FF0000";
  
$font_face "verdana";
  
$message_font_face "arial";
  
$message_font_size "2";


$do = isset($_REQUEST['do']) ? trim($_REQUEST['do']) : "";
$id = isset($_GET['id']) ? trim($_GET['id']) : "";
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$self $_SERVER['PHP_SELF'];

if (!
file_exists($data_file)) {
    echo 
"<b>Error !!</b> Can't find data file : $data_file.<br>";
    exit;
} else {
    if (
$max_record_in_data_file != "0") {
        
$f file($data_file);
        
rsort($f);
        
$j count($f);
        if (
$j $max_record_in_data_file) {
            
$rf fopen($data_file,"w");
            if (
strtoupper($os) == "UNIX") {
               if (
flock($rf,LOCK_EX)) {
                  for (
$i=0$i<$max_record_in_data_file$i++) {
                      
fwrite($rf,$f[$i]);         
                  }
                  
flock($rf,LOCK_UN);
               }
            } else {
               for (
$i=0$i<$max_record_in_data_file$i++) {
                  
fwrite($rf,$f[$i]);         
               }
            }
            
fclose($rf);
        }
    }
}