How to CHMOD uploaded images automatically

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!

Moderator: General Moderators

Post Reply
creative
Forum Newbie
Posts: 2
Joined: Fri Feb 20, 2004 8:47 pm

How to CHMOD uploaded images automatically

Post by creative »

How can you CHMOD uploaded images automatically?

After uploading an image through the php back end, somehow the CHMOD is changed from 777 to something else and the image does not get displayed.

Any help would be greatly appreciated!

Thanks, creative
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

When you upload them use [php_man]chmod[/php_man]()?

Mac
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Depending on your server setup you may need to use umask()
Post Reply