Flash Builder 4.5.1 PHP 警告语句

发布于 2024-12-25 00:50:54 字数 1376 浏览 9 评论 0原文

在我自己的 PHP 类中,我使用 include 语句,但“似乎”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 发出警告?这并没有阻止我的工作,但我讨厌错误的警告,如果他们错了,我就会感到不安。

In my own PHP classes I use include statements but it "appears" the Flash Builder IDE isn't able to "see" the include path because it's convinced that the class doesn't exist "Warning (orange underline) Class SQLConnectdb cannot be found" and a warning that says "assignment in a condition" even though it clearly does work as a PHP page. Ideally I'd like to be able to tell Flash Builder to either STFU or nominate "where" I know it exists. Let me show you:

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
          }
       }
    }
?>

then in require.php

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

then in 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");

?>

then in ./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
?>

My question is, how can I stop flash builder from emitting warnings? It's not stopping me work but I HATE having false warnings, if they are wrong it upsets me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

留一抹残留的笑 2025-01-01 00:50:54

我发现您可以通过进入来禁用这两个警告

 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

I found out that you can disable both these warnings by going into

 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文