phpstorm - 显示错误 : Unknown HTML tag

标签 phpstorm intellij-13

所以我刚开始使用 Phpstorm,我正在尝试“更正”我的代码,因此 IDE 没有错误。我有下面的方法,我所有的 xml 标签都用 'Unknown HTML tag' 突出显示

纠正此问题的最佳方法是什么?

private function generate_qbxml_CustomerAddRq($requestID=0){
                /** requestID is used when multiple requests are called in order to match the request to the response.
                    requestID's should be incremented as they are called. Currently not implimented. **/
                $qbxml  = '';
                $qbxml .= '<?xml version="1.0" encoding="utf-8"?>';
                $qbxml .= '<?qbxml version="2.0"?>';
                $qbxml .= '<QBXML>';
                $qbxml .=   '<QBXMLMsgsRq onError="stopOnError">';
                $qbxml .=       '<CustomerAddRq requestID="'.$requestID.'">';
                $qbxml .=           '<CustomerAdd>';
                $qbxml .=               '<Name>'.$this->Name.'</Name>'; //Name is a mandatory field. Add a check for this.
                /** For all optional values add a check so that xml tags are not sent in request if value is blank**/
                $qbxml .=               '<CompanyName>'.$this->CompanyName.'</CompanyName>';               
                $qbxml .=               '<FirstName>'.$this->FirstName.'</FirstName>';
                $qbxml .=               '<LastName>'.$this->LastName.'</LastName>';
                $qbxml .=               '<BillAddress>';
                $qbxml .=                   '<Addr1>'.$this->BillAddress->get_Addr1().'</Addr1>';
                $qbxml .=                   '<Addr2>'.$this->BillAddress->get_Addr2().'</Addr2>';
                $qbxml .=                   '<City>'.$this->BillAddress->get_City().'</City>';
                $qbxml .=                   '<State>'.$this->BillAddress->get_State().'</State>';
                $qbxml .=                   '<PostalCode>'.$this->BillAddress->get_PostalCode().'</PostalCode>';                                
                $qbxml .=                   '<Country>'.$this->BillAddress->get_Country().'</Country> ';                               
                $qbxml .=               '</BillAddress>';
                $qbxml .=               '<ShipAddress>';
                $qbxml .=                   '<Addr1>'.$this->ShipAddress->get_Addr1().'</Addr1>';
                $qbxml .=                   '<Addr2>'.$this->ShipAddress->get_Addr2().'</Addr2>';
                $qbxml .=                   '<City>'.$this->ShipAddress->get_City().'</City>';
                $qbxml .=                   '<State>'.$this->ShipAddress->get_State().'</State>';
                $qbxml .=                   '<PostalCode>'.$this->ShipAddress->get_PostalCode().'</PostalCode>';                                
                $qbxml .=                   '<Country>'.$this->ShipAddress->get_Country().'</Country> ';                               
                $qbxml .=               '</ShipAddress>';
                $qbxml .=               '<Phone>'.$this->Phone.'</Phone>';
                $qbxml .=               '<AltPhone>'.$this->AltPhone.'</AltPhone> ';
                $qbxml .=               '<Fax>'.$this->Fax.'</Fax> ';
                $qbxml .=               '<Email>'.$this->Email.'</Email> ';
                //$qbxml .=               '<JobDesc>Ob2</JobDesc>';
                $qbxml .=           '</CustomerAdd>';                
                $qbxml .=       '</CustomerAddRq>';
                $qbxml .=   '</QBXMLMsgsRq>';
                $qbxml .= '</QBXML>';

                return $qbxml;
            }

最佳答案

好吧,我自己想通了。

Alt+Enter 然后选择将 <'tag'> 添加到自定义 HTML 标签。

类似于您处理作为拼写错误出现的单词的方式。

关于phpstorm - 显示错误 : Unknown HTML tag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26342254/

相关文章:

php - 如何通过 PhpStorm 在 Vagrant 实例上运行应用程序?

git - Intellij Idea git 别名

maven - 使用 Maven 创建的 Artifact 运行 Tomcat 服务器到 IntelliJ 13

intellij-idea - 在PhpStorm中突出显示已更改的文件夹

css - "There is no no-color option ("少 --help "for help)"少

intellij-idea - Intellij 包前缀由项目的 gradle refresh 重置

android-studio - 使用光标键选择 IntelliJ 列

java - 如何在 IntelliJ IDEA 13 中设置 Tomcat 服务器配置以在部署前构建 Gradle 项目?

PHPMD 无法带参数运行

phpstorm - 从空行中删除制表符或空格