PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'll bet the user your script is running under doesn't have write permission to your public_html directory. Try doing a deeper one.. if that doesn't work, you may be able to do it through the FTP functions...