On Tue, October 17, 2006 11:30 pm, [EMAIL PROTECTED] wrote:
> results with:
> dir created
> error:
> Warning: copy(music/index.php): failed to open stream: Permission
> denied in /home/<username>/public_html/leaders/tod/index.php on line
> 27

> result with:
> dir created
>
> page blank
> or
> page copied success

> can you tell me why code 1 gives me an error or why code 2 gives blank
> pages some of the time (my theory for this maybe b/c ftp only allows
> so many connections).

It's hard to tell, really...

Perhaps it's because you do things like:
copy page to X
copy page to X

The first one succeeds, because you have write access to the directory.

The second one fails, because you do NOT haver permission to
over-write X once it is there.

If you want to be able to just over-write anything willy-nilly, you'll
need to chmod the files after you copy/create them.

Also, might I point out that your code as NO error checking?  If
you're writing code like this for production, it should be about 3
times as long, with all kinds of checks for the success/failure of
each operation, and doing something reasonable about any potential
failure...  Apologies in advance if you were kind enough to rip out
all the error checking for your post.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to