2016-08-03 57 views
0

這是我第一個使用CodeIgniter的項目。我在使用Netbeans 8.0.1自動完成時遇到問題。我找到了這個問題的答案,但他們不適合我。CodeIgniter 3.1和NetBeans 8.0.1自動完成器

我嘗試這些解決方案,但不是爲我工作

How to integrate codeIgniter with netbeans fully

NetBeans 8.0 PHP CodeIgniter Framework support

Netbeans code completion for CodeIgniter

當我嘗試將文件夾添加到PATH有以下錯誤:

共享:路徑D:\ MyP rojects \ project \ autocomplete已經是項目的一部分。

enter image description here

CI_Autocomplete.php

<?php 
    /** 
    * @property CI_DB_active_record $db 
    * @property CI_DB_forge $dbforge 
    * @property CI_Benchmark $benchmark 
    * @property CI_Calendar $calendar 
    * @property CI_Cart $cart 
    * @property CI_Config $config 
    * @property CI_Controller $controller 
    * @property CI_Email $email 
    * @property CI_Encrypt $encrypt 
    * @property CI_Exceptions $exceptions 
    * @property CI_Form_validation $form_validation 
    * @property CI_Ftp $ftp 
    * @property CI_Hooks $hooks 
    * @property CI_Image_lib $image_lib 
    * @property CI_Input $input 
    * @property CI_Language $language 
    * @property CI_Loader $load 
    * @property CI_Log $log 
    * @property CI_Model $model 
    * @property CI_Output $output 
    * @property CI_Pagination $pagination 
    * @property CI_Parser $parser 
    * @property CI_Profiler $profiler 
    * @property CI_Router $router 
    * @property CI_Session $session 
    * @property CI_Sha1 $sha1 
    * @property CI_Table $table 
    * @property CI_Trackback $trackback 
    * @property CI_Typography $typography 
    * @property CI_Unit_test $unit_test 
    * @property CI_Upload $upload 
    * @property CI_URI $uri 
    * @property CI_User_agent $user_agent 
    * @property CI_Validation $validation 
    * @property CI_Xmlrpc $xmlrpc 
    * @property CI_Xmlrpcs $xmlrpcs 
    * @property CI_Zip $zip 
    */ 

    class CI_Controller {}; 

    /** 
    * @property CI_DB_active_record $db 
    * @property CI_DB_forge $dbforge 
    * @property CI_Config $config 
    * @property CI_Loader $load 
    * @property CI_Session $session 
    */ 

    class CI_Model {}; 
?> 

回答

2

按照以下步驟

  1. 創建​​3210在外的應用程序文件夾的。
  2. 內創造CI_autocomplete.php文件
  3. CI_autocomplete.php添加以下代碼(Can download here

    <?php 
        /** 
        * @property CI_DB_active_record $db 
        * @property CI_DB_forge $dbforge 
        * @property CI_Benchmark $benchmark 
        * @property CI_Calendar $calendar 
        * @property CI_Cart $cart 
        * @property CI_Config $config 
        * @property CI_Controller $controller 
        * @property CI_Email $email 
        * @property CI_Encrypt $encrypt 
        * @property CI_Exceptions $exceptions 
        * @property CI_Form_validation $form_validation 
        * @property CI_Ftp $ftp 
        * @property CI_Hooks $hooks 
        * @property CI_Image_lib $image_lib 
        * @property CI_Input $input 
        * @property CI_Language $language 
        * @property CI_Loader $load 
        * @property CI_Log $log 
        * @property CI_Model $model 
        * @property CI_Output $output 
        * @property CI_Pagination $pagination 
        * @property CI_Parser $parser 
        * @property CI_Profiler $profiler 
        * @property CI_Router $router 
        * @property CI_Session $session 
        * @property CI_Sha1 $sha1 
        * @property CI_Table $table 
        * @property CI_Trackback $trackback 
        * @property CI_Typography $typography 
        * @property CI_Unit_test $unit_test 
        * @property CI_Upload $upload 
        * @property CI_URI $uri 
        * @property CI_User_agent $user_agent 
        * @property CI_Validation $validation 
        * @property CI_Xmlrpc $xmlrpc 
        * @property CI_Xmlrpcs $xmlrpcs 
        * @property CI_Zip $zip 
        */ 
    
        class CI_Controller {}; 
    
        /** 
        * @property CI_DB_active_record $db 
        * @property CI_DB_forge $dbforge 
        * @property CI_Config $config 
        * @property CI_Loader $load 
        * @property CI_Session $session 
        */ 
    
        class CI_Model {}; 
    
    
    ?> 
    
  4. 轉到

    • 工具
    • 插件
    • 安裝
      1. 卸載 - PHP CakePHP的框架(上卸載restart IDE later選項)
      2. 停用 - PHP CI框架Repositary(上卸載restart IDE later選項)

所有精細。至於簡單去你的控制器類型$this->load->可以看到建議像下面的圖像

01

1

請注意,笨3 CI_DB_active_record變化。

@property CI_DB_active_record $db 

@property CI_DB_query_builder $db 

代替