![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 25 Pomógł: 0 Dołączył: 29.12.2006 Ostrzeżenie: (0%) ![]() ![]() |
Nie chcę żeby helper form był ładowany automatycznie, wolę go uruchamiać sam. Gdy go jednak umieściłem w funkcji __construct wyświetla się error:
Cytat A PHP Error was encountered Severity: Notice Message: Undefined property: Formularz::$load Filename: controllers/formularz.php Line Number: 10 Fatal error: Call to a member function helper() on a non-object in /home/adam/public_html/workspace/CodeIgniter/system/application/controllers/formularz.php on line 10 Kod <?php
class Formularz extends Controller { function Formularz() { parent::Controller(); } function __construct() { $this->load->helper('form'); } function index() { // załadowanie formularza $view_form = $this->load->view('form','', True); $this->load->view('metrohacker/index', array('galeria' =>$view_form)); } function submit() { // załadowanie wynikowego formularza, przekazanie danych $view_submit = $this->load->view('wynik', array('czas' => $this->input->post('czas'), 'login' => $this->input->post('login'), 'password' => $this->input->post('password'), 'plec' => $this->input->post('plec'), 'zainteresowania' => $this->input->post('zainteresowania')), TRUE); $this->load->view('metrohacker/index', array('galeria' =>$view_submit)); } } ?> |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 249 Pomógł: 30 Dołączył: 18.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
-------------------- Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 01:36 |