Re: chmod
Matt Pelmear <[email protected]>
| Newsgroups | gmane.comp.php.database |
|---|---|
| Message-ID | <[email protected]> |
Emiliano,
This question is totally out of scope for this mailing list. It has
nothing to do with databases at all.
Also, you should _almost never_ use 0777 for permissions.
You probably want 0644. (Owner can read/write, all others can read.)
Regarding your question in general, it sounds like you are running this
on a Windows environment. I can't personally speak to whether chmod()
works well in that environment or not (I would never run a windows
server or dev environment for that matter), but I suspect it may not be
working as expected based on what you are describing, especially if you
are using an older version of PHP.
I would be willing to further help you diagnose the problem (others may
be as well), but I really think this does not belong on this mailing
list and, as such, those discussions should be held off-list.
FYI, I think the appropriate forum for this question would be either the
"General user list" or, if you are indeed using Windows, the "Windows
PHP users list":
http://php.net/mailing-lists.php
-Matt
On 08/20/2013 08:39 AM, Emiliano Boragina wrote:
> Hello everyone,
> I try to use chmod 0777, but the JPG file in my localhost I cant view.
> I must enter in the windows properties of the JPG file, add the user with
> full permission, and them i can view it.
> I use this:
> move_uploaded_file($file_tmp,"$desired_dir/".$file_name);
> chmod("$desired_dir/".$file_name,0777);
> What's wrong?
> Thanks. Emiliano
>
>