Breaking space

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Breaking space

Postby Lcf.vs » 22. February 2010 08:49


How can I put a breaking space in a filename with php? (breaking space is Alt+255 on Windows with belgian keyboard)

Please, reply in simple words as possible, I speak french, normally, and my english is really poor...

This script doesn't works:

Code: Select all
        $handle=fopen('file name with breaking space','w+');

Thank you by advance.
Posts: 2
Joined: 20. February 2010 22:57

Re: Breaking space

Postby Nobbie » 22. February 2010 09:29

Whats the difference between space and breaking space?
Posts: 11621
Joined: 09. March 2008 13:04

Re: Breaking space

Postby Lcf.vs » 22. February 2010 09:38

With breaking space (if it's really his name in english), Apache is unable to serve it to the client.

I found this good tip for the security on Wamp, principally for includes.

Example, on Wamp, the client can call a file with a normal space in the filename but not with a breaking space. (it return a Forbidden access)

But the breaking space is usefull for a lot of things, example in php, You can't name a variable as $one variable but it works if You replace the space by a breaking space. ;)
Posts: 2
Joined: 20. February 2010 22:57

Re: Breaking space

Postby syntax_error » 22. February 2010 10:57

Seems like a security through obscurity to me and using it in variable names is definitely not a good practice. Also, I don't think you really mean a breaking/zero-width space.

I think your problem is caused by different character encodings - on filesystem and in script. The character has probably different code in Windows encoding and in UTF-8 (default on most Linux systems). Or you're running even older Linux version, with some ISO 8859 character set... It's quite a mess...

So my recommendation is to get rid of this. If you don't believe me about the practice, you still have at least one reason: bad portability.
Posts: 14
Joined: 09. February 2010 19:24

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests