错误:致命错误:未捕获错误:在C:\ xampp\htdocs\php-mailer\index.php中找不到类'PHPMailer':4堆栈跟踪:在C:\ xampp\htdocs\php-中抛出#0 {main}第4行的邮件程序\ index.php
我的PHP代码在这里:
require("src/PHPMailer.php");
require("src/Exception.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "gmail id"; // SMTP username
$mail->Password = "mypassword"; // SMTP password
$mail->From = "opensourcesivaprakash@gmail.com";
$mail->FromName = "Mailer";
$mail->AddAddress("siva.sing.sivan@gmail.com", "Josh Adams");
$mail->AddAddress("sp"); // name is optional
//$mail->AddReplyTo("opensourcesivaprakash@gmail.com", "Information");
$mail->WordWrap = 50; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject …Run Code Online (Sandbox Code Playgroud) 我正在研究 React、Redux 和 Redux-saga,应用程序出现无限循环,请帮忙解决这个问题。
项目.js
import React from "react";
import ReactDOM from "react-dom";
import { Link } from "react-router-dom";
import { gateway as MoltinGateway } from "@moltin/sdk";
import getList from "./../Action/Action";
import { connect } from "react-redux";
//import data from "./data";
export class Item extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.pickItem = this.pickItem.bind(this);
}
pickItem(pickedItem, id) {
//this.props.getList();
//pickedItem.push(id);
//this.setState({ pickItem: pickedItem });
}
componentWillMount() {
this.props.getList();
}
render() {
const { pickedItem } = this.state;
//const …Run Code Online (Sandbox Code Playgroud) 我想基于ReactJS中的条件使用map函数从数组中获得一个索引值。
目前,如果条件通过,我将获得所有索引值,但是一旦条件为真,我想停止该条件。这样我在返回时将索引一个...
JSON对象:
question: [
{
'question_type': 'TEXT',
'question': 'how long have the founders known each other?',
'question_status': 'Done',
'expectedAnswer': "",
'answer': '5 yrs'
},
{
'question_type': 'EITHER',
'question': 'does any founder have an exit?',
'question_status': 'Pending',
'expectedAnswer':['Yes','No'],
'answer': "",
},
{
'question_type': 'DROPDOWN',
'question': 'Where are you from?',
'question_status': 'Pending',
'expectedAnswer':['india','USA','UK'],
'answer': "",
},
]
Run Code Online (Sandbox Code Playgroud)
在做过滤器的React功能
const currentQuestion = question.map(function (data, i) {
if (data.question_status === 'Pending') {
return (
<Row key={i} className='chat-box'>
<Col xl='1' lg='1' md='1' className="question-image">
<img …Run Code Online (Sandbox Code Playgroud)