Re: Replace a space with _

From: Date: Thu, 11 Jan 2001 23:47:46 +0000
Subject: Re: Replace a space with _
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34155@lists.php.net to get a copy of this message
just add this somewhere near the top. $filezip_name = ereg_replace(' ', '_', $filezip_name); Chris Lee Mediawaveonline.com ""David Smith"" <webmaster@indywebdesign.com> wrote in message news:MABBLAPKMKCPAFPFGAJKMEGJCBAA.webmaster@indywebdesign.com... > > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#34155) next »