RDF content include
Posted: Sat Mar 01, 2003 5:34 pm
I have the following code in include the content on my website, but I'm having a little trouble with it. The script isn't mine, it came from: http://www.cyberfly.net so all kudos to him for this work.
where = a url to an existing (tested) rdf. The error that I get is:
Warning: fopen("cache/bca9646b3da7363b1a883e0eccc0e3b9", "w") - No such file or directory in /var/www/html/newsFeeds/include.rdfshow.php on line 29
line 29 is:
the directory "cache" is set chmod 777 on my site and I've tested another script to write files to this directory without any problems, but for some reason, this one doesn't want to work.
Any help would be appreciated.
Code: Select all
function rdfshow($rdffile) {
$filename = CACHEPATH . md5($rdffile);
//$filename = CACHEPATH . $rdffile;
echo $filename . '<br>';
if(!file_exists($filename)) {
$fp = fopen($filename, "w");
if (!($fp == '')) {
fputs($fp, join('', file($rdffile)));
fclose($fp);
}
} else {
echo 'no, this is true';
exit();
if((time() - filemtime($filename)) > CACHETIME) {
$fp = fopen($filename, "w");
if (!($fp == '')) {
fputs($fp, join('', file($rdffile)));
fclose($fp);
}
}
}Warning: fopen("cache/bca9646b3da7363b1a883e0eccc0e3b9", "w") - No such file or directory in /var/www/html/newsFeeds/include.rdfshow.php on line 29
line 29 is:
Code: Select all
$fp = fopen($filename, "w");Any help would be appreciated.