RE: [PHP-GENERAL] copying files
| From: | Jason | Date: | Mon, 26 Jun 2000 19:17:33 +0000 |
| Subject: | RE: [PHP-GENERAL] copying files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3176@lists.php.net to get a copy of this message | ||
Try copying the file to /tmp and see if it will let you do that. If it will
then it's a permissions issue.
Jason
> -----Original Message-----
> From: Ken N [mailto:kenn@pcintelligent.com]
> Sent: Monday, June 26, 2000 9:07 AM
> To: Jason
> Cc: php-general@lists.php.net
> Subject: RE: [PHP-GENERAL] copying files
>
>
> Thanks for the help but that didn't seem to do the trick. I always get
>
> Warning: Unable to open 'index1.php3' for reading: No such file or
> directory in ....
>
> If it can see the file and print out the name once it gets a directory
> structure. Why can it not copy it?
>
> Thanks
> Ken N
>
> http://cleveland.lug.net/~rocket/
>
> The answer is simple if you grant that ironies are like submarines;
> dangerous only when submerged.
>
>
> On Mon, 26 Jun 2000, Jason wrote:
>
> > Try one of these:
> > copy($file, "$newdir/$domain/".$file);
> > copy($file, $newdir."/".$domain."/".$file);
> > copy($file, "$newdir/$domain/$file");
> >
> > The latter is probably better. I don't think you can have
> spaces when you
> > use the string concatenation operator.
> >
> > Jason
> >
> > > -----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
> >
>
>
> --
> 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