Jump to content
php.lv forumi

Kohana pēc install.php izdzēšanas error


laucinieks

Recommended Posts

Man kaut kā nesanāk palaist kontrolieri un skatu, kur ir subfolderī. Sk -

<?php defined('SYSPATH') OR die('No Direct Script Access');
Class Controller_Cms_Index extends Controller_Template
{
public $template = 'adminp/index';

public function action_index()
{
 	$this->template;
}
}
?>

 

Tātad skats ir iekš foldera adminp un kontrolieris ir iekš foldera cms. Ja es ielieku kontrolieri bez subfoldera, tad viss aiziet.

t.i. -

 

<?php defined('SYSPATH') OR die('No Direct Script Access');
Class Controller_cms extends Controller_Template
{
public $template = 'adminp/index';

public function action_index()
{
 	$this->template;
}
}
?>

Dokumentācijā, šādu gadījumu neatradu, tikai atradu pa vienam (ka vai nu kontrolieris ir subfolderī vai skats).

L.

Link to comment
Share on other sites

http://kohanaframewo...uting#directory - te tomēr nekas sakarīgs nav uzrakstīts :)

 

Route'i tu vari norādīt mapi:

// Controller_Admin1_<controller>
Route::set('admin1(/<controller>(/<action>(/<id>)))')
 ->defaults(array(
   'directory' => 'admin1'
 ));
// Controller_Admin1_Admin2_<controller>
Route::set('admin2(/<controller>(/<action>(/<id>)))')
 ->defaults(array(
   'directory' => 'admin1/admin2'
 ));

Edited by marcis
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...