Victor, I really appreciate your help. I've tried 777 on linux and I've tried to do this on windows as well, but I get the same error.
Where is it getting this directory for fopen?
[color=#000000][font=Consolas, 'Lucida Console', monospace][size=3]<p>Severity: Warning</p> <p>Message: fopen(C:\xampp\htdocs\CampusVirTour\tour\15) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory</p> <p>Filename: libraries/image_crud.php</p> <p>Line Number: 269</p> [/size][/font][/color]
I've tried changing the lines in image_crud.php (windows)
protected function _upload_file($path) {
$ci = &get_instance();
$ci->load->helper('url');
$gallery = strtolower((string)$this->ci->uri->segment(4));
$input = fopen(FCPATH . 'tour\\' . $gallery, 'r');
$temp = tmpfile();
$realSize = stream_copy_to_stream($input, $temp);
fclose($input);
$target = fopen($path, "w");
fseek($temp, 0, SEEK_SET);
stream_copy_to_stream($temp, $target);
fclose($target);
/* Resizing to 1024 x 768 if its required */
list($width, $height) = getimagesize($path);
if($width > 1024 || $height > 768)
{
$this->image_moo->load($path)->resize(1024,768)->save($path,true);
}
/* ------------------------------------- */
return true;
}
It still goes to the wrong directory ([color=#880000][size=2][background=rgb(248, 248, 248)]C:\xampp\htdocs\CampusVirTour\tour\15)[/background][/size][/color]. Thanks again.