This is just the will to learn, I put into production a site that has been working for some time. and I noticed that 'utf8_encode' worked on localhost but does not work in production now. Implemented the htmlentities and the result was inverse, the localhost disappeared the date and the net is perfect. Can someone explain why?
On the left is on the remote server and on the right is in place: Although the script used is the same.
Thisishowthebandwagonlooks:
<divid="news">
<?php foreach ($articles as $article) { ?>
<div><h2><?php echo $article['article_title']; ?></h2><br><span id="date">Publicado
<?php
setlocale(LC_ALL, 'pt_BR.utf8', 'Portuguese_Brazil');
//setlocale(LC_ALL, NULL);
date_default_timezone_set('Europe/Lisbon');
$uppercaseMonth = ucfirst(gmstrftime('%B'));
echo htmlentities(strftime( '%a, '.$uppercaseMonth.' %d de %Y'/* - %H:%M'*/, $article['article_timestamp']));
?></span><p><?php echo $article['article_content']; ?><br><br><span id="print"><a onclick="javascript:window.print();" href="#">Imprimir</a></span><span id="link"><a href="#">Enviar link</a></p></div>
<?php } ?>
</div>
This is correct in place:
<div id="news">
<?php foreach ($articles as $article) { ?>
<div><h2><?php echo $article['article_title']; ?></h2><br><span id="date">Publicado
<?php
setlocale(LC_ALL, 'pt_BR.utf8', 'Portuguese_Brazil');
//setlocale(LC_ALL, NULL);
date_default_timezone_set('Europe/Lisbon');
$uppercaseMonth = ucfirst(gmstrftime('%B'));
echo utf8_encode(strftime( '%a, '.$uppercaseMonth.' %d de %Y'/* - %H:%M'*/, $article['article_timestamp']));
?></span><p><?php echo $article['article_content']; ?><br><br><span id="print"><a onclick="javascript:window.print();" href="#">Imprimir</a></span><span id="link"><a href="#">Enviar link</a></p></div>
<?php } ?>
</div>