Jump to content


PHP Secure Uploading Form


1 reply to this topic

#1 rex3

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 04 May 2006 - 06:09 PM

Hi, does any body know how to create a secure file (image) uploading form, whereby you can change permissions to the destination folder before and after the move. So that the folder is first chmod 0777 then back to normal. I tried the standard chmod php function but it gave an operation not permitted error.

I looked at php.net and a post there stated that if you do get that error try chmoding via the ftp functions in php, they gave this example, but i dont really understand this code, can any body help out, for example where do you put your username and password for your ftp account and where the folder path, the one thats getting chmodded.

Hi could you please tell me how pixel2life upload there tutorials, i mean you can't tell me that such a big establishment keeps any folder chmoded to 777.

Please

Edited by rex3, 04 May 2006 - 06:37 PM.


#2 Chaos King

    Senior Programmer

  • P2L Staff
  • PipPipPip
  • 676 posts
  • Gender:Male
  • Location:Florida

Posted 05 May 2006 - 03:35 PM

You can keep your folders chmodded at 777 all the time. It is just a standard global to always alow your script to write to that file. Having that in mind, P2L probably just uploads your image the way everyother site would. It copies the image from your temporary folder and stores it on the server. All they do is rename the file to the corresponding tutorial id, still leaving on the extention. Simple as that, no harm done. :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users