April 21, 2024, 11:07 a.m. | php21

DEV Community dev.to

Hi,


When I am trying to execute below php script using a html webpage but it's not getting executed instead of this it points to the script itself.


here is that php script:-


``

<?php

use PHPMailer\PHPMailer\PHPMailer;

use PHPMailer\PHPMailer\Exception;


require 'E:/SW/XAMPP Installation/htdocs/fl1/PHPMailer-6.9.1/PHPMailer-6.9.1/src/Exception.php';

require 'E:/SW/XAMPP Installation/htdocs/fl1/PHPMailer-6.9.1/PHPMailer-6.9.1/src/PHPMailer.php';

require 'E:/SW/XAMPP Installation/htdocs/fl1/PHPMailer-6.9.1/PHPMailer-6.9.1/src/SMTP.php';


// Enable error reporting for debugging

error_reporting(E_ALL);

ini_set('display_errors', 1);


// Check if the form was submitted

if ($_SERVER["REQUEST_METHOD"] == "POST") {

// Form data

$name = $_POST['name'];

$phone = $_POST['phone'];

$email = …

error exception html installation php reporting

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne