Re: copying files
| From: | Joe Koenig | Date: | Mon, 26 Jun 2000 20:05:58 +0000 |
| Subject: | Re: copying files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3188@lists.php.net to get a copy of this message | ||
I have made this work - Here is a copy of my code...
mkdir("../".$directory, 0777);
copy("../clubs/club_page.php3", "../".$directory."/index.php3");
make sure your path names are correct.
Joe
> > -----Original Message-----
> > From: Ken N [mailto:kenn@pcintelligent.com]
> > Sent: Monday, June 26, 2000 8:58 AM
> > To: php-general@lists.php.net
> > Subject: [PHP-GENERAL] copying files
> >
> >
> > Hi,
> > I have this little piece of code that seems to work fine except it
> > doesn't copy the file. Other than that I know it's getting the filenames
> > cause it prints the, out and it's not have trouble creating the directory
> > either. any suggestions?
> >
> > Thanks
> > //=========================================
> > <?php
> > echo("<B>" . "I am going to move $domain into $newdir" .
> > "</B>");
> > mkdir("$newdir/$domain", 0770);
> > $directory = opendir("$dir/$domain");
> >
> > while ($file = readdir($directory))
> > {
> > if(($file != ".") && ($file != ".."))
> > {
> > copy($file, "$newdir/$domain/" . $file);
> >
> > echo("<B>" . "I moved $file into $newdir/$domain" .
> > "</B>" . "<BR>");
> > }
> > }
> >
> >
> > http://cleveland.lug.net/~rocket/
> >
> > The answer is simple if you grant that ironies are like submarines;
> > dangerous only when submerged.
> >
> >
> >
> > --
> > 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
> >
> >
>
> _______________________________________________________
> Site Design, Hosting, and E-Commerce at www.webpipe.net
>
> --
> 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