简体   繁体   中英

Remove Red Under Line In Visual Studio Code Show Error In Php

Visual studio code show syntax error in Codeigniter 3 how to fix them...

在此处输入图像描述

How to i remove these under line in visual studio code

It's for PHP Intelephense version, the current version has some configuration that mark framework's code, just go back to old version

Happened to me in PHP Codeigniter too, It's a Intelephense thing. You can disable Intelephense undefined property in Settings > Extensions > intelephense > Undefined property

在此处输入图像描述

But i think the best way to handle it is, add on top of document the property definition, to tell intelephense what is this property. Example:

For $this->data_session = $this->session->userdata();

Like this:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM