I'm trying to upload images
It's a redhat server. I don't get an errors (though the window closes, so might it be outputting errors), and it doesn't upload.
On my windows pc there was an error log in the php folder, but I can't find anything similar here. Anyone know where it is, or why this might be happening?
list($filename, $fileext) = explode(".", basename($upfile_name));
$file = $filename . '.' . $fileext;
// if file exists, add (1) onto end
if (file_exists($DOCUMENT_ROOT . '/dbimages/' . $file)) {
$i = 0;
while(file_exists($DOCUMENT_ROOT . '/dbimages/' . $file)) {
$i++;
$file = $filename . '(' . $i . ').' . $fileext;
}
}
$rfp = fopen($upfile, 'rb');
$wfp = fopen($DOCUMENT_ROOT . '/dbimages/' . $tonefolder . $file, 'wb');
fwrite($wfp, fread($rfp, filesize($upfile)));
fclose($wfp);
fclose($rfp);