Reply to Re: Try catch from php5 to php4?

Your name:

Reply:


Posted by Jerry Stuckle on 09/02/07 18:17

Enter The wrote:
> how can i replace
> try{
> if (!$facebook->api_client->users... {
> $facebook->redirect($facebook-...
> } catch(Exception $e) { //this will clear cookies for your app and
> redirect them to a login prompt
> $facebook->set_user(null, null);
> $facebook->redirect($appcallba...
> }
> from php5 to php4
>

Well, first of all, what is the type of $facebook? What is the minimum
level of PHP required for it?

You'll probably find, since it's throwing exceptions, that it requires a
minimum of PHP 5.x, and will not run under PHP 4. So you won't be able
to use it under PHP 4, either.

If this is your code, you can change the code here to check return codes
and use 'if' statements. But you'll have to change the code in the
classes also to return the proper value(s).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original 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

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