Jump to content
php.lv forumi

Recommended Posts

Posted

Lapā ar zend framework palīdzību tiek attēloti dati no google kalendāra, bet ik pa laikam tiek izmests šāds error:

 

Jul 18 10:51:37 web httpd[11624]: [error] [client 12.345.67.89] PHP Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message

'Unable to Connect to tcp://www.google.com:80. Error #0: php_network_getaddresses: getaddrinfo failed: Name or service not known'

in /home/www/xxx/Zend/Gdata/App.php:679\nStack trace:\n#0 /home/www/xxx/Zend/Gdata.php(221): [utt...]

 

Kā ar šo problēmu varētu cīnīties un kā to varētu atrisināt?

Posted
try {
    //Darbības, kas izsauc kļūdu
} catch (Exception $e) {
  //Šis kods izpildīsies, ja tā try darbība nofeilos
  //Šeit, piemēram, vari paziņot lietotājam, ka pašlaik nevar dabūt to kalendāru
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...