Welcome Guest, Not a member yet? Register   Sign In
How to start a project with CodeIgniter?
#1

[eluser]Mauricio de Abreu Antunes[/eluser]
Hi,

I'm new to CI and trying to build an intranet for an english school.
Currently, i'm using 2.1 CI version.
I dont know how to start my project even working with PHP for 2 years.
I know what is MVC because i work with Java/ASP.net, but the question is: how to integrate correctly CI with any project? Is there any "best configuration" for CI?
How to use routes without errors?
How to use friendly urls without errors?
Use or not use Smarty?
What about security using CI?
When do i use slug and how to use them?
Please, redirect me for the right post in this forum.

Thanks and regards.

#2

[eluser]goFrendiAsgard[/eluser]
Hi, you can start by read the documentation.
For me, I usually use HMVC plugin which is written by wiredezigns.

Or if you want a quick start, you can use some already exist CMS, like my No-CMS, pyrocms, bancha, or fuel-CMS. They are built for developer, so that you can focus on making modules.

I think there is no error when use routing, since you don't use nginx.

Use smarty is optional, you can pass your data when load a view in controller, something like:
Code:
$data = array("user_name"=>"Admin", "login"=>1);
$this->load->view("my_view", $data);

In your my_view.php, you can access $user_name and $login.
I think I don't really need smarty for this.
#3

[eluser]Mauricio de Abreu Antunes[/eluser]
Well, i have read CI user guide, but the user guide is so simple and almost useless when you are close to start a professional project.
I can not build a project just reading the user guide. I need more informations about CI 2.1, not 1.7. A lot of google links direct me for simple guides.

Thanks dude!
#4

[eluser]Jason Stanley[/eluser]
Why don't you start here?

http://net.tutsplus.com/articles/news/co...tch-day-1/

Codeigniter docs are great. They show you how to use each library and each function.. what more do you want?
#5

[eluser]Mauricio de Abreu Antunes[/eluser]
A lot of topics are from 1.7 version here.
And when i get a 2.0/2.1 CI topic some ideas are useless for now and the users dont give new ideas.
Btw, thanks for the link video. I watched this video last week.

Thanks and regards.
#6

[eluser]InsiteFX[/eluser]
Plan it out step by step!
#7

[eluser]Mauricio de Abreu Antunes[/eluser]
Ok, tell me steb by step how to remove index.php in CI?
I followed a lot of tutorials with differentes .htaccess files and they did not work for me.
I have local web server Apache 2.2.
The most of tutorials just tell me for create .htaccess and they dont mention folders, Apache rules...
Lemme know, please. User Guide tips are useless, just read and try it out on your server.

Thanks and regards!
#8

[eluser]CroNiX[/eluser]
Well, that really has nothing to do with CI. That has to do with Apache. .htaccess is something you should learn and know how to use as a web developer. There is no one size fits all .htaccess setup. They are entirely dependent on how YOU set your webserver up.

CI assumes you already know how to program in PHP, use webservers, css, etc.

But, .htaccess should be (in most setups) in the same directory that the main index.php resides in.
This is the one that works on my current development server, it may not work for you as I'm sure your server setup is slightly different than mine.
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
And of course, you have to remove index.php from your CI config files.
#9

[eluser]Mauricio de Abreu Antunes[/eluser]
My localhost is:
http://localhost/percutz/

I want http://localhost/percutz/index.php for http://localhost/percutz/ showing index.php or
http://localhost/percutz/index.php/clientes showing http://localhost/percutz/clientes.

A lot of tutorials not working for me.

My htaccess is attached here.
#10

[eluser]Mauricio de Abreu Antunes[/eluser]
Cronix, i tried it. Did not work. Sorry!
Please, any Apache configuration or config.php is needed?

Thanks and Regards!





Theme © iAndrew 2016 - Forum software by © MyBB