Re: uploading files.

From: Date: Sun, 25 Mar 2001 01:21:45 +0000
Subject: Re: uploading files.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7763@lists.php.net to get a copy of this message
mmmK, i have figured it out, anyone want it? lemme know olinux ----- Original Message ----- From: "olinux" <olnx@yahoo.com> To: <PHPLearners@yahoogroups.com> Cc: "PHP-DB" <php-db@lists.php.net> 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

« previous php.db (#7763) next »