Re: mkdir no such file or directory [message #181395 is a reply to message #181388] |
Wed, 15 May 2013 10:05 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma:
|
Senior Member |
|
|
Am 15.05.2013 05:06, schrieb Bhushan N.N:
> Here is my code again
>
> $filelocation = "/uploads/" . "/" . time();
> if (mkdir($filelocation,0777,true))
> {
> echo("Thank you for uploading the file.");
> }
> else
> {
> echo("Oops error uploading file.");
> }
1) Look carefully: "/uploads/" . "/" will result in "uploads//"
2) Does /uploads exist? It seems you miss the whole path the the root
directory of the webserver (/var/www/....) or you did not understand the
difference between the root URL in your browser and the physical path on
the machine where the script runs.
I assume you need a full path and not just "/uploads" and you have to
make sure, that the user which is used to execute PHP has the right
access rights within the given path.
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
|
|
|