Hi Everyone !
i have project short url, i want learn phalcon with it. i have installed phalcon with xampp . that's working ok. but upload to srv. my srv have installed nginx + apache + php + mariadb. ( reverse proxy ) only forms not load to controller then show views !
This my config namespaces in public/index.php
$loader = new Loader();
$loader->registerDirs( [ APP_PATH . '/controllers/', APP_PATH . '/models/' ] ); $loader->registerFiles( [ '../app/helper/createbitly.php', ] ); $loader->registerNamespaces( [ 'App\Forms' => '../app/forms' ] )->register();
This my header config Forms App/forms
<?php namespace App\Forms;
use Phalcon\Forms\Form; use Phalcon\Forms\Element\Text; use Phalcon\Validation; use Phalcon\Validation\Validator\Url as UrlValidator; use Phalcon\Forms\Element\Submit; // Validation use Phalcon\Validation\Validator\PresenceOf; use Phalcon\Validation\Validator\StringLength; use Phalcon\Validation\Validator\Confirmation; use Phalcon\Validation\Validator\Email;
class InputForm extends Form { public function initialize() { /**
- Name */ $name = new Text('name', [ "class" => "form-control", "required" => true, "placeholder" => "Nhập chính xác name" ]);
This my header controlller use form : App\Controllers\LoginController
<?php // use form use Phalcon\Events\Event; use Phalcon\Events\Manager as EventsManager; use Phalcon\Http\Request; use Phalcon\Mvc\Controller; use App\Forms\loginform;
class LoginController extends Controller { public function indexAction() { $this->view->form = new loginform();
}
pls help me !
many thanks.