سؤال

When I'm connecting to MySQL using the mysqli class constructor I get an echoed error message from PHP when I don't provide the correct connection details. However, there is an appropriate way to deal with errors, like connect_errno and connect_error, but PHP always seems to echo the fact that a connection was unsuccessful whereas I want to deal with any errors manually.

هل كانت مفيدة؟

المحلول

ini_set('display_errors', FALSE);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top