I have locally installed PHP, Mysql and Apache, however I'm trying to bring the day of the week through the code below:
setlocale(LC_TIME, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese');
$mes = date('m', strtotime('2018-02'));
$ano = date('Y', strtotime('2018-02'));
$qtdMes = cal_days_in_month(CAL_GREGORIAN, $mes, $ano);
for($dias = 1; $dias < $qtdMes; $dias++){
$diaSemana = utf8_encode(strftime("%A", strtotime($ano . '-' . $mes . '-' . $dias)));
echo "Dias da semana".$diaSemana;
}
The problem is that locally, it only brings me the first day and not the other days. I already installed locales
as below, but it did not work:
apt-get install locales
dpkg-reconfigure locales
On the remote server it works normally, but not locally.