Also consider :
$filezip_name = str_replace(' ', '_', $filezip_name);
http://php.net/manual/function.str-replace.php
It will be faster.
Philip
On Thu, 11 Jan 2001, Chris Lee wrote:
> just add this somewhere near the top.
>
> $filezip_name = ereg_replace(' ', '_', $filezip_name);
>
> Chris Lee
> Mediawaveonline.com
>
>
>
> ""David Smith"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > With the following code how can I check to see if the file being uploaded
> > has a space in it? Maybe replace them with a _ or reject them all
> > together...
> >
> > if ($FileType== "none") {
> > print "ERROR! - You must specify a File Type before we can begin the
> > upload.<BR>";
> > }
> > else {
> >
> > if ($filezip== "none") {
> > print "ERROR! - You must specify a zip file to upload.<BR>";
> > }
> > else {
> > copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name");
> > unlink($filezip);
> > }
> >
> >
> >
> > WreckRman2
> > Combat Flight Center
> > http://www.combatfs.com
> >
> >
> > --
> > PHP General 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]
> >
>
>
>
> --
> PHP General 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]
>
--
PHP General 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]