Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9360
| Message-ID | <6448731.fcIk2o3Qxo@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-05-15 21:31 +0200 |
| Subject | Re: mkdir no such file or directory |
| Newsgroups | comp.lang.php |
| References | (2 earlier) <kmvvk3$8so$1@dont-email.me> <TpSdnW030t12Dw7MnZ2dnUVZ_q2dnZ2d@giganews.com> <6377e853-a93c-47d9-953b-5a53ea8d641a@googlegroups.com> <a880675e-703c-4890-bd58-c41e9c76cfba@googlegroups.com> <L56dnaFJ-_MOSg7MnZ2dnUVZ_r-dnZ2d@giganews.com> |
Robert Heller wrote:
> "Bhushan N.N" wrote:
>> ie, if my website is called example, the structure will be
>>
>> example
>> index.php
>> upload.php
>> search.php
>> uploads
>> 12209214
>> somefile.txt
>> 31231203
>> otherfile.txt
>> about.php
>> contact.php
>
> That means you don't want "/uploads"! If the mkdir code is in upload.php,
> then you really do want:
>
> $directory = dirname(__FILE__) . "/uploads/" . time();
From PHP 5.3 on they may want to use
$directory = __DIR__ . "/uploads/" . time();
instead. However, see my other answer as to why either approach is not a
good idea.
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
mkdir no such file or directory "Bhushan N.N" <bhushan154@gmail.com> - 2013-05-14 20:04 -0700
Re: mkdir no such file or directory "Bhushan N.N" <bhushan154@gmail.com> - 2013-05-14 20:06 -0700
Re: mkdir no such file or directory "J.O. Aho" <user@example.net> - 2013-05-15 06:34 +0200
Re: mkdir no such file or directory Richard Yates <richard@yatesguitar.com> - 2013-05-14 21:37 -0700
Re: mkdir no such file or directory Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-05-14 22:39 -0600
Re: mkdir no such file or directory Arno Welzel <usenet@arnowelzel.de> - 2013-05-15 12:05 +0200
Re: mkdir no such file or directory The Natural Philosopher <tnp@invalid.invalid> - 2013-05-15 11:23 +0100
Re: mkdir no such file or directory Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-15 12:38 +0000
Re: mkdir no such file or directory Robert Heller <heller@deepsoft.com> - 2013-05-15 08:51 -0500
Re: mkdir no such file or directory "Bhushan N.N" <bhushan154@gmail.com> - 2013-05-15 08:19 -0700
Re: mkdir no such file or directory "Bhushan N.N" <bhushan154@gmail.com> - 2013-05-15 08:20 -0700
Re: mkdir no such file or directory Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-15 18:37 +0200
Re: mkdir no such file or directory "Bhushan N.N" <bhushan154@gmail.com> - 2013-05-15 16:20 -0700
Re: mkdir no such file or directory Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-15 23:55 +0000
Re: mkdir no such file or directory Robert Heller <heller@deepsoft.com> - 2013-05-15 13:44 -0500
Re: mkdir no such file or directory Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-15 21:31 +0200
csiph-web