Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Basic cache using ob flush


madmatt69 - 1:05 am on Nov 22, 2009 (gmt 0)


Can anyone tell me why this code snippet doesn't work? I have it at the end of my document after everything has been processed. I can get it to work using fopen, but thought I'd try to refine it:
<?php
$fileCache = "/home/site/www/cache/acache.html";
ob_flush();

if(is_writable($fileCache)) file_put_contents($fileCache, ob_get_flush());

?>

Any ideas? It just doesn't seem to be saving the file.


Thread source:: http://www.webmasterworld.com/php/4029472.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com