Jump to content

Making an upload directory


LemonInflux

Recommended Posts

2 quick questions for this one -

 

1. Does mkdir() need a full file path, or can I just use the relative path?

2. What would you say is the best CHMOD value for an upload directory that holds any file, and can be accessed by all users?

 

----------------

Now playing: Augustana - Sweet and Low (Alternate Version)

via FoxyTunes

Link to comment
https://forums.phpfreaks.com/topic/113257-making-an-upload-directory/
Share on other sites

1.  No, it does not, but if you want to give it one anyway, you could make a full path with realpath().  Example: realpath("../some_folder"); would return /home/corbin/some_folder assuming you were in /home/corbin/<some folder> when you called the function.

2.  The most restrictive setting possible that allows the script to function correctly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.