how to begin

#1
[eluser]vang163[/eluser]
Hi,

i've just download & install CI. i'm using WAMP.

At this directory: c:\wamp\www\CodeIgniter_1.7.1\
there is a existing file index.php, should i need to remove it?

To begin my project, i should create all my php files under this directory?
c:\wamp\www\CodeIgniter_1.7.1\system\application\

There is a existing file index.html, should i need to remove it?

I'm now working offline as "localhost", should i need to change this value in the config.php for it to work?
$config['base_url'] = "http://example.com/"; ----> "localhost"

Also in the config.php, $config['enable_query_strings'] = FALSE;
I've learned how to to get the value from this type of URL:
example.com?who=me&what=something&where=here

How can i get the value from this type of URL?:
example.com/who/what/where/


When i complete my project and wish to go online, i just need to load all the files & folders in this directory?
c:\wamp\www\CodeIgniter_1.7.1\system\application\
folder - config
folder - controllers
folder - errors
folder - helpers
folder - hooks
folder - language
folder - libraries
folder - models
folder - views
and of course all my php files ....

Is the above procedure correct? Or am i missing something...

Many thanks for your patience and guidance.

regards

#2
[eluser]User Guide[/eluser]
Fortunately I have a page for someone just like you, and it's called Getting Started if you can believe that.

Quote:I’m now working offline as “localhost”, should i need to change this value in the config.php for it to work?
$config[‘base_url’] = “http://example.com/”;——> “localhost”

Well, not unless you have a host entry routing example.com to 127.0.0.1

Actually, the best setting for 'base_url' is "/" because it then doesn't matter what your domain is. Use something like "/folder/" if CodeIgniter is installed off the document root.

Quote:How can i get the value from this type of URL?:
example.com/who/what/where/

Quote:URI Class

$this->uri->segment(n)

Permits you to retrieve a specific segment. Where n is the segment number you wish to retrieve. Segments are numbered from left to right. For example, if your full URL is this:
http://example.com/index.php/news/local/...rime_is_up

The segment numbers would be this:

1. news
2. local
3. metro
4. crime_is_up

By default the function returns FALSE (boolean) if the segment does not exist. There is an optional second parameter that permits you to set your own default value if the segment is missing. For example, this would tell the function to return the number zero in the event of failure:
Code:
$product_id = $this->uri->segment(3, 0);

It helps avoid having to write code like this:
Code:
if ($this->uri->segment(3) === FALSE)
{
    $product_id = 0;
}
else
{
    $product_id = $this->uri->segment(3);
}

#3
[eluser]Thorpe Obazee[/eluser]
Did you read the user_guide?

EDIT: The User Guide beat me/

#4
[eluser]vang163[/eluser]
Hi,

after looking around for the whole night, i have found this to be very useful in answering my questions: http://ifonlyiknewthat.com/codeigniter/s...deigniter/
and this was NOT found in the user manual.

At least show the way, if too busy to answer, not answering at all is much more appreciated than replying 'have you read the user manual'.

#5
[eluser]Colin Williams[/eluser]
That certainly is a nice primer, vang163, but what's in the user guide is 100% adequate to get you up and running. How has it sufficed for so many other people if this is not the case?

Many of the questions you asked hinted at ZERO knowledge of the user guide. Did you read the User Guide before you posted?

#6
[eluser]vang163[/eluser]
hi,

I've read partially, jumping here & there to get a overall picture what CI can do and eagerly testing out at the same time. The few chapters does not help me in getting the full view. Only when i read the article at that website does help me out.

i'm not a professional programmer. By reading my questions seriously, one should know that i'm a php novice and know that i've read the manual. If not, how did i know those variables in those files?

Note: user manual does not means that people reading it will fully understand what it is being written.

The reply was not constructive & productive at all and i find it rude to reply like that. Especially if the person is from serving this forum community service. This is not like other chit-chat forum where you can reply what you like. Community image should be taken care of if you do intend to promote the use of this software/framework even though it is free. And a forum is being setup for this purpose, to give solutions or assistance or guidance or path to solutions etc to those who seeks help, isn't it?

Do consider to rewrite/add user manual in such a way that novice like me can easily understand, thanks.

#7
[eluser]Thorpe Obazee[/eluser]
[quote author="vang163" date="1245919675"]Hi,

i've just download & install CI. i'm using WAMP.

At this directory: c:\wamp\www\CodeIgniter_1.7.1\
there is a existing file index.php, should i need to remove it?
[/quote]

Read: http://ellislab.com/codeigniter/user-gui...index.html especially this part, "Normally the index.php file will be at your root" <-- means you need it there...

[quote author="vang163" date="1245919675"]
To begin my project, i should create all my php files under this directory?
c:\wamp\www\CodeIgniter_1.7.1\system\application\


There is a existing file index.html, should i need to remove it?
[/quote]

Read: http://ellislab.com/codeigniter/user-gui...index.html

[quote author="vang163" date="1245919675"]
I'm now working offline as "localhost", should i need to change this value in the config.php for it to work?
$config['base_url'] = "http://example.com/"; ----&gt; "localhost"
[/quote]
Code:
$config['base_url'] = "http://localhost/";
It also depends on your server setup.

[quote author="vang163" date="1245919675"]
Also in the config.php, $config['enable_query_strings'] = FALSE;
I've learned how to to get the value from this type of URL:
example.com?who=me&what=something&where=here

How can i get the value from this type of URL?:
example.com/who/what/where/
[/quote]

Read http://ellislab.com/codeigniter/user-gui...s/uri.html

[quote author="vang163" date="1245919675"]
When i complete my project and wish to go online, i just need to load all the files & folders in this directory?
c:\wamp\www\CodeIgniter_1.7.1\system\application\
folder - config
folder - controllers
folder - errors
folder - helpers
folder - hooks
folder - language
folder - libraries
folder - models
folder - views
and of course all my php files ....

Is the above procedure correct? Or am i missing something...

Many thanks for your patience and guidance.

regards[/quote]

Read: http://ellislab.com/codeigniter/user-gui...index.html

To answer most of your questions, I just pointed to just two pages.

#8
[eluser]vang163[/eluser]
Hi,

no offense, many thanks for your patience & guidance Smile

regards

#9
[eluser]Thorpe Obazee[/eluser]
No problem, but I believe you should have tried a CI setup in the same time reading the user_guide before asking those questions.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.