Welcome Guest, Not a member yet? Register   Sign In
Scaffolding in constructor. PHP 5
#1

[eluser]ak-83[/eluser]
Hi every1!
Got a noob question.. It is said in CI documentation one can define scaffolding right in controller constructor and the get it with "controller/secret-word" request. If i code my constructor in PHP4 way -> it works well. But when I use PHP5 style -> it fails, showing 404 error. What's the deal?
The code that works below...
Code:
class Blog extends Controller {
        function Blog(){
            parent::Controller();
            $this->load->database('default');
            $this->load->scaffolding('posts');
        }
// IT WORKS!

Not work..

Code:
class Blog extends Controller {
        function __construct(){
            parent::Controller();
            $this->load->database('default');
            $this->load->scaffolding('posts');
        }
//DON'T WORK!
#2

[eluser]ak-83[/eluser]
And, thanks in forward :-)
#3

[eluser]überfuzz[/eluser]
Quote:Scaffolding has been deprecated from CodeIgniter as of 1.6.0.
#4

[eluser]überfuzz[/eluser]
And welcome to the forum. :-)
#5

[eluser]ak-83[/eluser]
Thanks 4 fast reply!
I've read translated docs, and that statement was absent there.
So, it was a quite handy feature.. Is there any replacements for sacaffolding? (except phpMyAdmin :-D)




Theme © iAndrew 2016 - Forum software by © MyBB