Re: uploading files.

From: Date: Sun, 25 Mar 2001 15:34:13 +0000
Subject: Re: uploading files.
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-7775@lists.php.net to get a copy of this message
Yes Please ----- Original Message ----- From: "boclair" <boclair@bigpond.net.au> To: "olinux" <olnx@yahoo.com>; "PHP-DB" <php-db@lists.php.net> Sent: Sunday, March 25, 2001 2:55 AM Subject: Re: [PHP-DB] uploading files. > Yes please > > Tim Morris > > ----- Original Message ----- > From: olinux <olnx@yahoo.com> > To: PHP-DB <php-db@lists.php.net> > Sent: Sunday, March 25, 2001 11:21 AM > Subject: Re: [PHP-DB] uploading files. > > > > 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 > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#7775) next »