I'm trying to upload a file using a form

the upload code I'm using is
//======================================================
<?php
// settings

 $base_img_dir = "http://localhost/app_images/";;
  include("db.php");



// generate unique id for use in filename

$uniq =uniqid("");

$filename = $base_img_dir.$uniq;
move_uploaded_file($HTTP_POST_FILES["file"]["tmp_name"], $filename);

?>
//======================================================

this code generated the following erro
//======================================================
Warning: move_uploaded_file(http://localhost/app_images/4139de74488ad):
failed to open stream: HTTP wrapper does not support writeable connections.
in C:\Program Files\Apache Group\Apache2\htdocs\upload.php on line 25

Warning: move_uploaded_file(): Unable to move 'C:\WINDOWS\php11.tmp' to
'http://localhost/app_images/4139de74488ad' in C:\Program Files\Apache
Group\Apache2\htdocs\upload.php on line 25

//======================================================

thanks in advance

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to