Re: Re: Spaces in filename or path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Tim Streater" <tim@xxxxxxxxxxxxxxxx> wrote:

>On 30 Apr 2011 at 22:33, Richard Quadling <rquadling@xxxxxxxxx> wrote: 
>
>> On 30 April 2011 22:07, Tim Streater <tim@xxxxxxxxxxxxxxxx> wrote:
>>> Does it matter to PHP filesystem functions if a path/to/file/name
>contains
>>> spaces? IOW, is this handled OK by design or should I replaces such
>spaces by
>>> backslash-space or would doing that present problems?
>>>
>>> Thanks Â-- Âtim
>>
>> On Windows, PHP will happily access files and directories with
>spaces...
>
>Richard,
>
>I'll be doing this under OS X. I will be passing such paths/names to
>shell scripts too, but AIUI I can use escapeshellarg () there. As long
>as PHP filesystem functions don't have a problem then I should be OK.
>
>Cheers  --  tim
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

MacOS treats spaces the same as Linux. Like Richard said, you can use quotes if you're passing things to the shell, and also a backslash will work too. The only thing I would avoid if possible is spaces in paths that would reach the client side, i.e. in image paths, css files, etc, as I've heard historic browsers have trouble sometimes escaping the spaces automatically.


Thanks
Ash
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux