I'm using denwer as my wamp-server, o have code, that exports graphics, but on my drive I have little free space, and i want to save this files for example to the D:
drive.
How would I do this?
Also here is part of my code:
while($row = odbc_fetch_array($data))
{
//if($row['GRD_ID'] != "") {
/* $file_name_jp2 = "TI/" . $table_name . "/" . $row['GRD_ID'] . ".jp2";
$file = fopen ($file_name_jp2, "w");
fputs($file, $row['GRD_GRAPHIC']);
fclose($file);
*/
$file_name_jpg = "TI/" . $table_name . "/" . $row['GRD_ID'] . ".jp2";
$file_out_jpg = str_replace('.jp2', '.jpg', $file_name_jpg);
file_put_contents($file_name_jpg, $row['GRD_GRAPHIC']);
// execute imagemagick convert to change to jpeg with quality 40
exec("/usr/local/ImageMagick/convert $file_name_jpg -quality 20 -format jpg $file_out_jpg");
unlink($file_name_jpg); // get rid of temp jp2 file
set_time_limit(0);
unset($row);
$l++;
//}
$k++;
}
See $file_name_jpg