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


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

K, I am using a script i found at
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


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

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

olinux [who thanks you all greatly]

Do You Yahoo!?
Get your free address at

PHP Database Mailing List (
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