title: Yii - Inheriting From Custom Controller Class - Not Found
body: <pre><code>class SomeController extends Controller
  {
  
          public function actionIndex() {
                  echo 'This is some controller';
          }
  }
  
  
  class AnotherController extends SomeController
  {
  
          public function actionIndex() {
                  echo 'This is another controller';
          }
  }
  </code></pre>
  <p>This works:</p>
  <pre><code>index.php?r=some
  </code></pre>
  <p>but ...</p>
  <pre><code>index.php?r=another
  </code></pre>
  <p>says:</p>
  <blockquote>
  <p>PHP warning</p>
  <p>include(SomeController.php): failed to open stream: No such file or directory</p>
  </blockquote>
  <p>Both of the files are in</p>
  <pre><code>test\protected\controllers\
  </code></pre>
  <p>BTW in the past I also tried using the Gii Controller Generator with &quot;SomeController&quot; as the base class...</p>
  <p>It said:</p>
  <pre><code>The controller has been generated successfully. You may try it now.
  
  Generating code using template 
  &quot;C:\xampp\htdocs\yii\framework\gii\generators\controller\templates\default&quot;...
  generated controllers\YetAnotherController.php
  generated views\yetAnother\index.php
  done!
  </code></pre>
  <p>When I clicked on &quot;try it now&quot; it also said:</p>
  <blockquote>
  <p>PHP warning</p>
  <p>include(SomeController.php): failed to open stream: No such file or directory</p>
  </blockquote>