You are here: 首頁

飛朵啦學習手札

本網站建議使用Firefox2.0以上,或是使用Goole瀏覽器來瀏覽,並使用1024x768解析度來觀看.

JA slide show

新聞公告

歡迎來到飛朵啦學習手札

26

[PHP][轉]PHPmailer Gmail Smtp的設定及驗證方法

E-mail 列印 PDF

文章轉自:https://digishot.keenchief.com/tw/2928511342/2928511342

 


PHPmailer 是php程式中廣泛被用來寄信的class, 它含有豐富的類別可以使用,使用起來很方便也很快速,這篇文章是擷取至網路上的資料,教學如何透過gmail用smtp寄信的設定方法

下載phpmailer:

最近更新 ( 週一, 26 四月 2021 17:21 )
 
 
26

[php] 錯誤訊息:php_network_getaddresses: getaddrinfo failed: Name or service not known

E-mail 列印 PDF

錯誤訊息大致如下:

A PHP Error was encountered

Severity: Warning

Message: fopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

Filename: controllers/reservation2.php

Line Number: 317

A PHP Error was encountered

Severity: Warning

 

請先在主機上 ping 那個要連線的 domain name,看是否有回應

1. 有回應:重啟apache
有回應代表目前系統上 dns server 是正常的,但 apache 抓到的設定是舊的,所以就重啟 apache

2. 沒回應
2.1 檢查 /etc/resolv.conf,調整 nameserver
可以使用 nameserver 168.95.1.1 #中華電信
2.2 或直接修改 /etc/hosts 加上 ip 與 domain name 的對應

 
 
20

Centos-PHP環境下設定安裝Mssql連線功能

E-mail 列印 PDF

指令碼如下:

sudo yum install php-mssql

但是在Centos環境下,預設是無法安裝mssql套件的,因此我們需要擴充套件庫來支援,例如Epel

安裝Epel

sudo yum install epel-release

 

文章參考自:https://www.astralweb.com.tw/centos-php-install-mssql-lib-and-enable/

 
更多文章...
第 6 頁, 共 50 頁