You are here: Re: PHP - ExcelReader « PHP Programming Language « IT news, forums, messages
Re: PHP - ExcelReader

Posted by adnanalam on 08/27/06 23:32

But it works on one server and doesn't on the other. How is that
possible?


davie wrote:
> adnanalam@gmail.com wrote:
> > Hi,
> >
> > I keep getting these errors for at least 500 lines. Not sure what
> > exactly is wrong? The same exact script works just fine on my other
> > server.
> >
> > Anyone else having the same problem? Any help would be appreciated.
> >
> >
> > "Notice: Uninitialized string offset: -512 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27
> >
> > Notice: Uninitialized string offset: -511 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27
> >
> > Notice: Uninitialized string offset: -510 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27
> >
> > Notice: Uninitialized string offset: -509 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27
> >
> > Notice: Uninitialized string offset: -508 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27
> >
> > Notice: Uninitialized string offset: -507 in
> > /home/christo8/public_html/admin/excelReader/oleread.inc on line 27"
>
> Here is a possible gotcha related to oddness involved with accessing
> strings by character past the end of the string:
>
> $string = 'a';
>
> var_dump($string{2}); // string(0) ""
> var_dump($string{7}); // string(0) ""
> $string{7} === ''; // TRUE
>
> It appears that anything past the end of the string gives an empty
> string.. However, when E_NOTICE is on, the above examples will throw
> the message:
>
> Notice: Uninitialized string offset: N in FILE on line LINE
>
> This message cannot be specifically masked with @$string{7}, as is
> possible when $string itself is unset.
>
> isset($string{7}); // FALSE
> $string{7} === NULL; // FALSE
>
> Even though it seems like a not-NULL value of type string, it is still
> considered unset.

 

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

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