簡體   English   中英

使用codeigniter發送電子郵件SMTP時出現時間錯誤 - mediatemple hosting

[英]Time error when sending email SMTP with codeigniter - mediatemple hosting

我使用codeigniters電子郵件助手(SMTP)從我的網站發送電子郵件

電子郵件正在成功發送到我的收件箱但是我收到以下錯誤:

A PHP Error was encountered

Severity: Warning

Message: date() [function.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 'America/Los_Angeles' for 'PST/-8.0/no DST' instead

Filename: libraries/Email.php

Line Number: 704

我最近將我的主機切換到mediatemple,之前沒有這樣的消息。 我需要在某個地方或時區指定時間格式嗎?

在您的php.ini文件中設置date.timezone ,警告應該消失。

我相信MediaTemple允許您通過在主目錄中包含php.ini來編輯php.ini設置。

如果你沒有更新php.ini的權限(通常你沒有),
你可以將這一行添加到你的PHP腳本: -

date_default_timezone_set("Asia/Singapore"); <-- replace to your desire city

這里有關於此功能的更多文檔: http//uk.php.net/date_default_timezone_set

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM