【问题标题】:Flash Builder 4.5.1 for PHP warning statementsFlash Builder 4.5.1 for PHP 警告语句
【发布时间】:2012-01-05 10:19:54
【问题描述】:

在我自己的 PHP 类中,我使用包含语句,但它“显示”Flash Builder IDE 无法“看到”包含路径,因为它确信该类不存在“警告(橙色下划线)类 SQLConnectdb找不到”和一个警告说“在一个条件下赋值”,即使它显然可以作为一个 PHP 页面工作。理想情况下,我希望能够将 Flash Builder 告诉 STFU 或指定我知道它存在的“位置”。让我告诉你:

myservice.php
<?php
    include_once("require.php");
    class MyService{
       public function getService(){
          $db = new SQLConnectdb(); //get Class cannot be found warning
          $db->query("SELECT * FROM mytable");
          while($Mytable = $db->getnextrow()){ //get assignment in a condition warning
          }
       }
    }
?>

然后在require.php中

require.php
<?php
    include("apache2/htdocs/master.include.php");
?>

然后在master-include.php中

<?php
   define("access",1);
   function autoload_classes($class_name) {     
        include 'apache2/htdocs/classes/' . $class_name . '.class.php';
   }
   spl_autoload_register('autoload_classes');
   if (file_exists("./conf.inc.php")) include_once("./conf.inc.php");

?>

然后在 ./conf.inc.php 中

<?php
  if(!defined("access")) die("you cannot access this file directly");

  define("conf_db_host","somehost");
  define("conf_db_user","someuser");
  //SQL connection details, etc etc
?>

我的问题是,如何阻止 flash builder 发出警告?这并没有阻止我的工作,但我讨厌有错误的警告,如果他们错了,我会感到不安。

【问题讨论】:

  • 不想这么说,但你把钱浪费在了不必要的专有软件上。
  • ? flash builder 为 iPhone、iPad、Android 和 Blackberry 开发移动应用程序?
  • 使用 PHP?哇,这对我来说是新的。
  • 在服务器上使用 PHP 并在客户端上使用闪存?当然是的
  • 泡茶也行吗? ;)

标签: php class ide flash-builder suppress-warnings


【解决方案1】:

我发现您可以通过进入

来禁用这两个警告
 Preferences, 
 PHP (Right hand side twister) 
 "Semantic Analysis Properties" (right hand side sub menu) 
 then after it loads onto the left hand side expand 
 the "Potential Programmer Problems" 
 then chose to "Ignore" Assignment in condition" and "Undefined Class or interface

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多