Cache-anje ne dela
 
G-force 29. okt 2009 13:40:16 Pridružen od:
31. mar 2008
828 objav
516 60 3
#1

Uporabim spodnjo kodo...


<?php
ob_start();
?>

PHP / HTML vsebina

<?php
$cachefile = "../cache/stran.html";
$ft = fopen($cachefile, 'w');
fwrite($fp, ob_get_contents());
fclose($fp);
ob_end_flush();
?>

Stran.html se ustvari, vendar je vsebina prazna. Testiram na WAMPSERVER 2.0, PHP 5.2.9-2. (default nastavitve)



Hvala za pomoč


všeč(0) ni všeč(0) spam(0)
 
mtance 4. nov 2009 15:43:51 Pridružen od:
27. jan 2008
508 objav
198 16 1
#2

<?php

$cachefile = "../cache/stran.html";

$ft = fopen($cachefile, 'w');

fwrite($fp, obgetcontents());

fclose($fp);

obendflush();

?>



Popravi $ft v $fp


všeč(2) ni všeč(0) spam(0)
 
G-force 4. nov 2009 16:16:57 Pridružen od:
31. mar 2008
828 objav
516 60 3
#3

Odlično! Zdaj dela. :) Hvala ti.


všeč(0) ni všeč(0) spam(0)
 
 

🔒 Za odgovor na to temo se moraš prijaviti.

Prijavi se