You are here: Re: Redirect page problem with IE « HTML « IT news, forums, messages
Re: Redirect page problem with IE

Posted by Toby Inkster on 10/10/40 11:31

Jonathan N. Little wrote:

> I'll take a stab, highlight_file without a 2nd parameter prints rather
> than returns a string. The && 0 inverts the boolean output so it exits
> with '0' like errorlevel 0 on success and '1' on error.

You're on the right track. highlight_file() does indeed print out rather
than return a string (though from PHP 4.2, there is an option to return a
string instead). It returns TRUE (assuming success).

So this:

exit(highlight_file(BLAH));

becomes this:

exit(TRUE);

Now, exit() doesn't take a boolean value, but an integer, so it interprets
the TRUE as:

exit(1);

so it exits with an error level of 1. If we add the &&0 we get:

exit(1&&0);

forcing an error level of 0.

Why is the error level important? For non-zero error levels, PHP prints
the error level to the browser, so you end up with a little '1' at the end
of your source code.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

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

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