Dreamweaver does not recognize the command "use"

New Here ,
Dec 12, 2018 Dec 12, 2018

Copy link to clipboard

Copied

I'm using Phpmailer and these two lines must be the first ones in my PHP script:

use PHPMailer\PHPMailer\PHPMailer;

use PHPMailer\PHPMailer\Exception;

Dreamweaver highlights these lines in red.

I'm using Dreamweaver version 11.0

Many thanks

Views

242

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Dec 12, 2018 Dec 12, 2018

Are you working with a .php file?  This looks OK to me in Dreamweaver 2019.

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

<?php

use PHPMailer\PHPMailer\PHPMailer;

use PHPMailer\PHPMailer\Exception;

?>

</body>

</html>

Likes

Translate

Translate
Adobe Community Professional ,
Dec 12, 2018 Dec 12, 2018

Copy link to clipboard

Copied

Are you working with a .php file?  This looks OK to me in Dreamweaver 2019.

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

<?php

use PHPMailer\PHPMailer\PHPMailer;

use PHPMailer\PHPMailer\Exception;

?>

</body>

</html>

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

LATEST

yes of course, it's a .php file

it must be the version then, thanks

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines