You are here: Re: Strange characters appearing from includes « HTML « IT news, forums, messages
Re: Strange characters appearing from includes

Posted by Toby A Inkster on 06/26/07 15:51

dorayme wrote:

> I have been getting some strange characters appear from my local
> server when some markup is delivered via a php include.

This probably isn't your problem, but I thought I'd like to mention
it anyway, just in case.

Mac OS X likes to create a hidden file in each directory called
".DS_Store". If you use any PHP code that loops through an entire
directory and includes each file found there (which is what I do
to load plugins for my CMS) then this will cause the binary
".DS_Store" file to be included, adding about a kilobyte or so of
random crap to your output. This happens if you're using Mac OS X
as your server OS (as I was), or have uploaded an entire directory
from a Mac OS X development machine onto your server.

I solved this by telling my plugin loading mechanism to ignore all
files with names that start with a dot.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 5 days, 19:24.]

A New Look for TobyInkster.co.uk
http://tobyinkster.co.uk/blog/2007/06/22/new-look/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация