Highlighted

Dreamweaver does not recognize the command "use"

New Here ,
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

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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>

Views

188

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

Dreamweaver does not recognize the command "use"

New Here ,
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

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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>

Views

189

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
Dec 12, 2018 0
Adobe Community Professional ,
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, ACP
Alt-Web.com

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
Reply
Loading...
Dec 12, 2018 1
New Here ,
Dec 13, 2018

Copy link to clipboard

Copied

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
Reply
Loading...
Dec 13, 2018 0