A HOW TO: automatic set permission: 1 line of code

add this line after line 563 of your code and it will automatically set the permissions for uploaded files. When I first ran your script every time it uploaded a file it set the permissions to 0600 which was not accessable to public. So I would have to open my ftp program every time I added a pic or movie. I was using Yahoo, a shared host. I wanted others to be able to post as well without giving them my ftp info. I added this line and now it works. [b]@chmod(str_replace(chr(92),chr(47),getcwd()).'/'.$imagefilename,0777); [/b] so it should look like this [img]http//uashome.alaska.edu/~dpannone/u.jpg[/img] [size=18][color=#FF0000]*don't forget the semicolon after this line otherwise you get a blank page[/color][/size]

Post edited by dominickalaska, at 2007/11/07 1319