Re: Cannot copy a file to a dynamic folder

From: Date: Wed, 18 Jul 2001 08:08:12 +0000
Subject: Re: Cannot copy a file to a dynamic folder
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58396@lists.php.net to get a copy of this message
Hi! when you use the "\" character in a string you have to escape it by putting "\\" instead of one! > $default_dir = ("D:\www\Proj\$textfield2\"); would become: $default_dir = "D:\\www\\Proj\\$textfield2\\"; do the same for the $filename variable. "Vincent Chew" <vchew@cisco.com> wrote in message news:3B54BBE5.C0D95EBE@cisco.com... > I get a parse error every time and I've modified the scripts a bunch of > times already. > > // Make new directory function > $default_dir = ("D:\www\Proj\$textfield2\"); > if(file_exists($default_dir)) rmdir($default_dir); > mkdir($default_dir, 0777); > > // Copy template.html to new directory > $filename = D:Automator\auto_2\Template.html; > copy($filename, ($default_dir) .overview.html); > > Can I not have these two scripts run together? The mkdir function alone > works. Can someone tell me what I'm doing wrong? > > Thank you. >

« previous php.general (#58396) next »