mmmK,

i have figured it out,
anyone want it?
lemme know

olinux


----- Original Message -----
From: "olinux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "PHP-DB" <[EMAIL PROTECTED]>
Sent: Saturday, March 24, 2001 4:27 PM
Subject: [PHP-DB] uploading files.


K, I am using a script i found at hotscripts.com
I need it to upload an image to server.
I think that my issue is that i need to use the stripslashes(); somewhere,
but i don't know where

anyways here tis:

<?

 function do_upload($filename,$newname) {
  $file = basename($filename);
  $tmp_upload_path = "c:/program files/apache group/apache/htdocs";
  $new_file_name = "c:/program files/apache group/apache/htdocs".$newname;
 $file = stripslashes($file);
 $tmp_upload_path = stripslashes($tmp_upload_path);
 $new_file_name = stripslashes($new_file_name);
  if (!copy($tmp_upload_path.$file, $new_file_name)) echo "failed to copy
file<br>\n";
  return;
}

?>

and later i calll the function:

<? do_upload($userfile,$newname); ?>

here the error i receive:
Warning: Unable to open 'c:/program files/apache group/apache/htdocsphp2'
for reading: No such file or directory in c:\program files\apache
group\apache\htdocs\uploads\2\upload_go.php on line 9

and script returns this
      upload tmp file: \\php2


There is an article at phpbuilder called file uploading made easy
http://phpbuilder.com/columns/bealers20000904.php3

i am having the same issues with this script and though i found an answer to
the file://php2 thing [it was a stripslashes()  solution] I am getting an
error with this script that there is an unset variable... It looks set to me
:)

puzzled,
olinux [who thanks you all greatly]



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to