Buongiorno a tutti sto usando questo script per un calendario :
<?
include "config.php";
$noeventmsg = "No event for today";
$db = mysql_connect($host,$login,$password);
mysql_select_db($base,$db);
///////////////////////
///////////////////////
if (isset($_GET['eventdate']))
{ $eventdate = $_GET['eventdate']; }
if (isset($_GET['monthno']))
{ $monthno = $_GET['monthno']; }
else
{ $monthno=date(n); }
if (isset($_GET['year']))
{ $year = $_GET['year'];
}
else
{ $year = date(Y); }
if (isset($_GET['view']))
{ $view = $_GET['view'];
}
else
{ $view = 0; }
//if ($monthno==0){ $monthno=12; $year=$year-1;}
//if ($monthno==13){ $monthno=1; $year=$year+1;}
$monthfulltext = date(F, mktime(0, 0, 0, $monthno, 1, $year));
$monthshorttext = date(M, mktime(0, 0, 0, $monthno, 1, $year));
$day_in_mth = date(t, mktime(0, 0, 0, $monthno, 1, $year)) ;
$day_text = date(D, mktime(0, 0, 0, $monthno, 1, $year));
$today = date("Y-m-j");
?>
recupero il mese con questo:
<? echo $monthfulltext." ".$year ?>
e funziona, pero' il mese e' in inglese (lo mvorrei in italiano, stavo provando a inserire questo:
<?php
setlocale(LC_ALL, 'ita_ita');
?>
ad inizio pagina ma il mese e' sempre in inglese.
Come posso fare.
Grazie.

Rispondi quotando