The Punisher
MFC Üyesi
-
- Üyelik Tarihi
- 6 Haz 2015
-
- Mesajlar
- 578
-
- MFC Puanı
- 31
PHP:
<?php ob_start(); ?>
<style type="text/css">
.hata {color: blue; padding: 10px; text-decoration: underline; font-family: Arial}
</style>
<?php
## Türkçe Karakter ##
header("Content-Type: text/html; charset=utf-8");
## Hata Verme Fonksiyonu ##
function hata($hata, $boyut = 1, $class = false, $renk = "#000") {
if($boyut >= 1 && $boyut <= 6) {
if($class) {
unset($renk);
echo '<h'.$boyut.' class="'.$class.'">'.$hata.'</h'.$boyut.'>';
exit();
}else {
echo '<h'.$boyut.' style="color: '.$renk.'">'.$hata.'</h'.$boyut.'>';
exit();
}
}else {
return false;
}
}
## Deneyelim ##
$hata = "İşlem Başarısız!";
$h_tagi = 3;
$class = "hata";
$renk = "red";
hata($hata, $h_tagi, "", $renk);
ob_end_flush();
?>