Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: mkdir no such file or directory Date: Wed, 15 May 2013 12:05:33 +0200 Lines: 30 Message-ID: <51935DED.4000704@arnowelzel.de> References: <1d2ec34d-5532-4576-bcce-8c0cb77637ab@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net mYnLLSbTOG+r1UGSONMYFQ6o40OhF3tmxHKa2RMv8uDDeScxKF Cancel-Lock: sha1:EgDMYME6kFAOxp78tY1Gsvn2FGw= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <1d2ec34d-5532-4576-bcce-8c0cb77637ab@googlegroups.com> Xref: csiph.com comp.lang.php:9341 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