downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

$HTTP_RAW_POST_DATA> <$_COOKIE
[edit] Last updated: Fri, 23 Mar 2012

view this page in

$php_errormsg

$php_errormsgÖnceki hata iletisi

Açıklama

$php_errormsg PHP tarafından üretilen son hata iletisinin metnini içeren bir değişkendir. Bu değişken sadece hatanın oluştuğu alan içinde ve sadece track_errors ayar seçeneği açıldıysa (öntanımlı değeri kapalıdır) geçerlidir.

Bilginize: Bu değişken sadece php.ini içindeki track_errors yönergesi etkin olduğunda kullanılabilir.

Uyarı

Eğer bir kullanıcı tanımlı hata eylemcisi (set_error_handler()) atanmışsa $php_errormsg değişkenine sadece hata eylemcisi FALSE döndürürse bir değer atanır.

Örnekler

Örnek 1 - $php_errormsg örneği

<?php
@strpos();
echo 
$php_errormsg;
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

Wrong parameter count for strpos()



add a note add a note User Contributed Notes $php_errormsg
josh at karmabunny dot com dot au 04-Jul-2011 09:41
The track_errors parameter is PHP_INI_ALL, so you can use code like this:

<?php
ini_set
('track_errors', 1);

$result = @do_risky_thing();
if (!
$result) {
    echo
'<p>Error' . htmlspecialchars($php_errormsg) . '</p>';
}

ini_set('track_errors', 0);
?>
ryan kulla 19-Jan-2009 08:32
Note: This variable doesn't seem to get populated if you're running Xdebug.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites