uploading files.

From: Date: Sun, 25 Mar 2001 00:27:51 +0000
Subject: uploading files.
Groups: php.db 
Request: Send a blank email to php-db+get-7762@lists.php.net to get a copy of this message
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]

« previous php.db (#7762) next »