在PHP中使用离线服务器 [英] Using offline server in PHP

查看:116
本文介绍了在PHP中使用离线服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在通过离线服务器在PHP中使用mail命令时遇到问题. 我使用了mail(to, subject, body)函数,但是邮件没有发送到该地址.我应该在线吗?

I'm having problems using the mail command in PHP through an offline server. I've used the mail(to, subject, body) function but the mail wasn't sent to the address. Should I be online?

推荐答案

否,您的问题是没有安装SMTP服务器.我建议您检查以下内容:

No, your problem is that you have no SMTP server installed. I suggest you to check on of these:

在线教程

在线教程#2

成功设置后,您还需要配置php.ini,以指向您正在使用的SMTP.

After successfull setting it up, you'll need to configure your php.ini too, to point at the SMTP you are using.

或者您也可以创建自己的SMTP,而不用创建自己的SMTP.选择是您的.

Or instead of creating your own, you can google how to use someone else's SMTP. The choice is yours.

这篇关于在PHP中使用离线服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆