你如何处理关于PEAR事情的错误?

时间:2021-02-18 07:13:24

When I use PEAR, it always generates lots of errors. How do you treating about them?

当我使用PEAR时,它总是会产生很多错误。你是如何对待他们的?

  1. use PEAR, and just ignore errors. What is error thing? I can't see them.
  2. 使用PEAR,只是忽略错误。什么是错误的事情?我看不到他们。

  3. use PEAR, but tweak error level, to they do not generate errors.
  4. 使用PEAR,但调整错误级别,他们不会产生错误。

  5. Don't use PEAR thing. switch to cakephp.
  6. 不要使用PEAR的东西。切换到cakephp。

2 个解决方案

#1


PEAR is very backwards compatible, so you will always get lot's of errors of newly deprecated functionality.

PEAR非常向后兼容,因此您总是会遇到很多新弃用功能的错误。

CakePHP also throws a lot of E_STRICT errors, so it's not uncommon.

CakePHP也会抛出很多E_STRICT错误,所以这并不罕见。

Instead of just ignoring them, I would look at the error and try to assess for yourself whether or not it's an error worth ignoring.

我不会忽略它们,而是会查看错误并尝试自己评估这是否是一个值得忽略的错误。

I personally write for PHP 5.2 STRICT, so I don't use any PEAR libraries. I prefer to try to be future compatible, rather than backwards compatible and I assume there will be a recent enough version of PHP installed.

我个人写的是PHP 5.2 STRICT,所以我不使用任何PEAR库。我更喜欢尝试将来兼容,而不是向后兼容,我认为最近将安装足够的PHP版本。

#2


For example when using ldap_connect I put a @ in front of the function. Was that what you meant? :)

例如,当使用ldap_connect时,我在函数前放了一个@。那是你的意思吗? :)

#1


PEAR is very backwards compatible, so you will always get lot's of errors of newly deprecated functionality.

PEAR非常向后兼容,因此您总是会遇到很多新弃用功能的错误。

CakePHP also throws a lot of E_STRICT errors, so it's not uncommon.

CakePHP也会抛出很多E_STRICT错误,所以这并不罕见。

Instead of just ignoring them, I would look at the error and try to assess for yourself whether or not it's an error worth ignoring.

我不会忽略它们,而是会查看错误并尝试自己评估这是否是一个值得忽略的错误。

I personally write for PHP 5.2 STRICT, so I don't use any PEAR libraries. I prefer to try to be future compatible, rather than backwards compatible and I assume there will be a recent enough version of PHP installed.

我个人写的是PHP 5.2 STRICT,所以我不使用任何PEAR库。我更喜欢尝试将来兼容,而不是向后兼容,我认为最近将安装足够的PHP版本。

#2


For example when using ldap_connect I put a @ in front of the function. Was that what you meant? :)

例如,当使用ldap_connect时,我在函数前放了一个@。那是你的意思吗? :)