hello,
i download mvc from this link:
http://www.henriquebarroso.com/how-to-create-a-simple-mvc-framework-in-php/
i want use from this mvc to my project. i use from xampp and extract codes to htdocs but anything not display on the browser.
What to do?
You’d be better off using an existing established framework. That is only a basic example, I don’t think it’s really intended to build a public website on. Look at the Zend Framework framework.zend.com or code igniter codeigniter.com
The main point being these are established, monitored and maintained frameworks. Plus they all have docs and examples for getting started.
Zend in a monster, I wouldn’t recommend Zend unless you have previous knowledge of PHPMVC and OO programming. Something lighter like CakePHP or CodeIgnitor, as suggested will probably confuse you less and lead to more quality understanding of PHPMVC, in a generic sense.
thanks!
I see codeigniter.com and read contents it,
did this (codeigniter) is like smarty?
What are the advantages or disadvantages of her?
No codeigniter is not like smarty,even as I thing you can use smarty with codeigniter .
Codeigniter is a mvc framework and smarty is a template engine…
Codeingiter is simple and fast as they say but you may see cakephp.org and yiiframework.org.
There are good frameworks and they have more features,my opinion.
thanks!
what is difference between framework and template engine?
I work with codeigniter . I have a problem to database conection:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: BlogModel::$db
Filename: models/BlogModel.php
Line Number: 14
Fatal error: Call to a member function insert() on a non-object in D:\xampp\htdocs\MVC\system\application\models\BlogModel.php on line 14
line 14:
$this->db->insert(‘test_ci’, $_POST);
What to do?
Did you set the connection with the database and load it?
http://codeigniter.com/user_guide/database/examples.html
tanks!
The problem with superseded the following code in autoload.php will fix:
$autoload[‘libraries’] = array(‘database’);
but created new error:
A Database Error Occurred
You must use the “set” method to update an entry.
What to do?
Please read the documentation of CI about queries.
And my opinion it to try also another one framework as yiiframework or cakephp after the try of codeigniter.
thanks
ok, i read Active Record Insert to CodeIgniter Home › User Guide Home › Database Library › Database Example Code,
$data = array(
'title' => $title,
'name' => $name,
'date' => $date
);
$this->db->insert('mytable', $data);
I have several question!
where is define variables $title, $name, $date ?
how must define variables $title, $name, $date ?
I thing you can not learn mvc programming with CI here
See your messages