/*** 1 ****/ /*** 2 ****/ /*** 3 ****/ /*** 4 ****/ /*** 5 ****/ /*** 6 ****/ /*** 7 ****/ /*** giriş çıkış ikonu ****/ /*** giriş çıkış ikonu ****/ /**** 9 ****/ /**** 10 ****/ /**** 11 ****/ /**** 12 ****/ /**** 13 ****/ /***** 14 ****/ /**** 15 *****/ /***** 16 *****/ /**** 17 ****/ /**** 18 *****/ /**** 19 ****/ /***** 20 *****/ /***** 21 ****/ / ***** 22 ****** / / ***** 23 *****/ /**** 24 ****/ /**** 25 ****/ /**** 26 *****/ /**** 27 *****/ /**** 28 *****/ /**** 29 *****/ /**** 30 *****/ /**** 31 ****/ /**** 32 ****/ /**** 33 *****/ /*** 34 ***/ /*** 35 ***/ /**** 36 ***/ /**** 37 ****/ /*** 38 ****/ /*** 39 ****/ /***** 40 ****/ /***** 41 *****/ /*** 42 ****/ /**** 43 ****/ /**** 44 ****/ /**** 45 ***/
Webmaster Forum
HABERLER

Blog Haberler

Php Örnekleri

  • Konu Sahibi Konu Sahibi WMF
  • Başlangıç tarihi Başlangıç tarihi
  • Cevap Cevap : 0
  • Görüntüleme Görüntüleme : 2K

WMF 7 3

Gold Üye
Mesajlar
205
Beğeni
2
Puan
0
Php Örnekleri
Tarihi yazdırmak

<html>

<head>
<title>Example #1 TDavid's Very First PHP Script ever!</title>
</head>
<? print(Date("1 F d, Y")); ?>

<body>
</body>
</html>
<html>

<head>
<title>Example #3 TDavid's Very First PHP Script ever!</title>
</head>
<? print(Date("m/j/y")); ?>

<body>
</body>
</html>
<html>

<head>
<title>PHP Script examples!</title>
</head>
<font face="Arial" color="#FF00FF"><strong><? print(Date("m/j/y")); ?>
</strong></font>

<body>
</body>
</html>
<html>

<head>
<title>Example #1 TDavid's Very First PHP Script ever!</title>
</head>
<? print(Date("l F d, Y")); ?>

<body>
</body>
</html>

Haftanın her günü farklı bir arkaplan rengi
<html>
<head>
<title>Background Colors change based on the day of the week</title>
</head>
<?
$today = date("l");
print("$today");
if($today == "Sunday")
{
$bgcolor = "#FEF0C5";
}
elseif($today == "Monday")
{
$bgcolor = "#FFFFFF";
}
elseif($today == "Tuesday")
{
$bgcolor = "#FBFFC4";
}
elseif($today == "Wednesday")
{
$bgcolor = "#FFE0DD";
}
elseif($today == "Thursday")
{
$bgcolor = "#E6EDFF";
}
elseif($today == "Friday")
{
$bgcolor = "#E9FFE6";
}
else
{
// Since it is not any of the days above it must be Saturday
$bgcolor = "#F0F4F1";
}
print("<body bgcolor=\"$bgcolor\">\n");
?>
<br>This just changes the color of the screen based on the day of the week
</body>
</html>
<html>
<head>
<title>Background Colors change based on the day of the week</title>
</head>
<?
$today = date("w");
$bgcolor = array(
"#FEF0C5", "#FFFFFF", "#FBFFC4", "#FFE0DD",
"#E6EDFF", "#E9FFE6", "#F0F4F1"
);
?>
<body bgcolor="<?print("$bgcolor[$today]");?>">
<br>This just changes the color of the screen based on the day of the week
</body>
</html>

Sayfanın en son değiştirilme tarihini gösteren php kodu

<html>
<head>
<title>Page last updated on month/date/year hour:min PHP Script</title>
</head>
<?
$last_modified = filemtime("example7.php3");
print("Last Modified ");
print(date("m/j/y h:i", $last_modified));
?>
</body>
</html>

<?
$check = "test";
$check .= $filename;
if ($test == $check)
{
print("<HTML><BODY>You have already voted. Thank you.</BODY></HTML>");
}
else
{
$rated = "test";
$rated .= $filename;
setcookie(test, $rated, time()+86400);
print("<HTML><BODY><br>You haven't voted before so I recorded your vote</BODY></HTML>");
}
?>
 
Son düzenleme:
Geri
Üst
Forum Blog Dizin Giriş Yap