简体   繁体   English

如何在Eclipse中为PHP禁止警告?

[英]How do I suppress warnings in Eclipse for PHP?

In Eclipse, I'm getting warnings for not having a start tag ( <div> ) because the start tag is in another file. 在Eclipse中,我收到没有开始标记( <div> )的警告,因为开始标记位于另一个文件中。 How do I suppress this warning to keep it out of my "Problems" window? 如何禁止此警告以使其远离“问题”窗口?

I know in Java I could do @SuppressWarning, but I don't know how for php. 我知道在Java中我可以做@SuppressWarning,但我不知道如何使用php。 I assume that there is, based on the availability of php type hinting in Eclipse, but maybe it isn't? 我假设有,基于Eclipse中的PHP类型提示的可用性,但也许它不是?

You may also set this on a per project base. 您也可以在每个项目基础上设置它。 Go to

Project -> Properties -> Validation

and modify your settings as you like. 并根据需要修改您的设置。 You can suppress a lot of warnings, especially HTML -> Document Type -> Invalid Location! 你可以抑制很多警告,特别是HTML - >文档类型 - >无效的位置!

Go to Window > Preferences. 转到窗口>首选项。 Under Web > HTML Files > Validation you'll find "Missing start tag:" and "Missing end tag:" 在Web> HTML文件>验证下,您将找到“缺少开始标记:”和“缺少结束标记:” 在此输入图像描述

window->preferences->validation->suspend all validators window-> preferences-> validation->暂停所有验证器

will also make eclipse way faster :) 也会让eclipse更快:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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