Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Clauido José

Iniciando com php

Recommended Posts

Estou iniciando php estou aprendo pelo site da 3wscools.com estou fazendo os exemplo dele esta dando um erro em um exemplo que usa fiunção date. Aparece o seguinte erro:

 

 

 

 

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. inC:\inetpub\wwwroot\cursophp\exemplo10.php on line 11

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Isso ocorre quando seu PHP não está com a configuração de timezone definida

 

Você pode alterar no php.ini ou pode usar a função date_default_timezone_set. Veja http://php.net/manual/pt_BR/function.date-default-timezone-set.php

Compartilhar este post


Link para o post
Compartilhar em outros sites

Amigo pode me ajudar porque eu entrei no php.ini e tirei o ; da linha date.default_latitude = 31.7667 e mesmo assim não funciono;

Compartilhar este post


Link para o post
Compartilhar em outros sites

date.default_latitude é diferente de date.timezone (que é a diretiva a ser alterada no php.ini). Se a diretiva não existir, crie-a.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.