cyphix
05-14-2004, 11:22 PM
It writes to the files fine & creates them etc.. but including the file spouts errors even tho the file "does" exist.
<?php
$file="num.txt";
$content = file_get_contents($file);
$content++;
$resourceid = fopen($file, "w");
fputs($resourceid, $content);
fclose($resourceid);
$sn = $content;
$snf = $sn . "file.txt";
$fd = fopen("files/$snf", "w");
fputs($fd, "\$fileid = $sn;");
fclose($fd);
include('files/$snf');
?>
Any clue?
<?php
$file="num.txt";
$content = file_get_contents($file);
$content++;
$resourceid = fopen($file, "w");
fputs($resourceid, $content);
fclose($resourceid);
$sn = $content;
$snf = $sn . "file.txt";
$fd = fopen("files/$snf", "w");
fputs($fd, "\$fileid = $sn;");
fclose($fd);
include('files/$snf');
?>
Any clue?