- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在使用 XAMPP,当尝试通过 localhost
发送电子邮件时,我收到以下警告:
Warning:
stream_socket_enable_crypto()
: this stream does not support SSL/crypto inC:\xampp\htdocs\12work\class.smtp.php
on line 197
这是我的代码:
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.gmail.com"; // specify main and backup server
$mail->SMTPAuth = true;
$mail->Port = 25;
$mail->SMTPSecure = "tls";
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "sheikh.abm@gmail.com"; // SMTP username
$mail->Password = "mypassword"; // SMTP password
$mail->From = "sheikh.abm@gmail.com"; //do NOT fake header.
$mail->FromName = "MailMan";
$mail->AddAddress("sheikh.abm@gmail.com"); // Email on which you want to send mail
$mail->IsHTML(true);
$mail->Subject = "Just a Test";
$mail->Body = "Hello. I am testing <b>PHP Mailer.</b>";
if(!$mail->Send())
{
echo $mail->ErrorInfo;
}else{
echo "email was sent";
}
最佳答案
好的,我们需要启用Open SSL 模块。方法如下:
php.ini
文件;extension=php_openssl.dll
;
字符启用模块。提示:如果您不熟悉php.ini
文件,建议在修改前创建一个备份。 ini 是一个配置文件,配置错误或损坏的 ini 会导致 web 服务器无法启动。
如果您使用的是 wamp 等 LAMP 堆栈,应该可以通过图形界面启用模块。
关于 php.ini
的更多信息: https://secure.php.net/manual/en/configuration.file.php
关于php - 第 197 行警告 : stream_socket_enable_crypto(): this stream does not support SSL/crypto in C:\xampp\htdocs\12work\class. smtp.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14978459/
我在访问 > 时遇到问题 尝试过的 URL:localhost/htdocs 本地主机:80/htdocs ip:80/htdocs 总是同样的错误 错误: 找不到对象! 在此服务器上找不到请求的 U
我在服务器中安装了 xampp 服务器,我想不仅从(http://localhost/folder/file.php)而且从其他计算机通过其 ip 打开 htdocs 中的项目。示例:(192.168
我最近在我的 mac 上安装了 XAMPP。我正在尝试将文件从 Desktop 文件夹复制到 htdocs 文件夹。 我要复制的文件夹大约为 5 MB。但是复制文件需要很长时间。此外,我在尝试编辑此文
我正在使用 php 进行开发,并且在 Windows 7 机器上使用 mysql 作为后端。我已经安装了 xampp 服务器,并且使用 apache 2.4 作为网络服务器。我有一个 mtnl 路由器
通过 PHPMyAdmin 创建新数据库并尝试访问 localhost/newdatabase 时,我收到以下消息: "Object not found! The requested URL was
我正在尝试获取一个简单的 phpinfo() 以在我的本地服务器上打印出来(使用 MAMP)。我在 /Applications/MAMP/htdocs (php_sandbox) 中创建了一个新目录,
我关注了this说明能够在 htdocs 目录之外托管文件,但我总是得到“访问禁止”( https://gyazo.com/af49cb00720fa4bd80e969320bd51042 )。 该文
今天我将网站迁移到了一家新的托管公司 (Verio)。我以前已经这样做过很多次了,我知道您的网站应该位于“htdocs”文件夹中。 现在,通常当我使用 FileZilla 时,我可以在文件名上“右键单
我有一个用 php 编写的 Web 应用程序,在 Linux 服务器中使用 Apache,问题是该服务器可以被许多用户访问,我想要做的是,限制 htdocs 文件夹而不破坏需要 Apache 才能显示
我是 linux 的新手,我正在尝试使用命令 git clone git@gitlab.com 将项目克隆到当前包含在 opt/lampp/htdocs 中的文件夹中:whatever . 但是我收到
我将我的电脑用作我的小型企业的本地销售点,因此将我的 php 文件放在 htdocs 或 www(对于 wamp)文件夹中是不安全的,任何用户都可以访问。我尝试通过右键单击 -> 安全选项卡来锁定文件
我已经为 macOS Sierra 安装了 XAMPP。 我在 XAMPP 的应用程序中有一个图标。 我能够运行服务器及其服务,但我找不到 htdocs文件夹。 我在\Library\Webserve
我最近购买了一台新的 MacBook Pro(10.8 操作系统)并安装了 MAMP 3.0(不是 MAMP-Pro),但我一直在网上搜索如何在查看 htdocs 中的文件夹时显示所有文件> 目录,例
我正在尝试在本地主机 (XAMPP) 上创建虚拟主机。尝试了所有组合,但我总是加载 htdocs 而不是特定文件夹 这是hosts 文件: 127.0.0.1 localhost ::1 localh
我安装了 XAMPP 并创建了一个简单的网站(htdocs 文件夹中的一个文件夹“网站”),其中包含一个链接 Info . 如果我输入 localhost/website在浏览器中,我得到一个默认主页
我已经在互联网上搜索了这个问题的答案,所以我想我会在这里提出这个问题。我已经安装了 Apache Tomcat 和 MySQL。我现在想安装 phpmyadmin 来使用我的 mySQL 数据库。所有
我正在通过 ssh 在 linux 服务器上工作,想知道将 html 和 php 文件放在哪里(htdocs 文件夹),但在我看来服务器正在运行 lighttpd 我的目录结构是这样的。 最佳答案 这
你好,我有这个问题,我试图将文件保存到 htdocs 上的目录,它说权限被拒绝。
如何找到我的 htdocs 目录。 当我执行以下命令时: echo dirname(__FILE__); 我得到以下输出: /var/www/myexample.com/htdocs/require
在处理 php 文件时,我在思考如何设置 Subversion 时遇到了一个小问题。我将所有文件存储在 c:\www[nameOfProject]\htdocs 并为每个项目设置虚拟主机。 (c:\w
我是一名优秀的程序员,十分优秀!