Welcome Guest, Not a member yet? Register   Sign In
Absolute "noob" questions
#1

[eluser]callumd[/eluser]
Hi there,

I've been developing in PHP and MySQL for almost 3 years, and really enjoy it.

I've never used a framework, nor have I been able to conceptually understand what the benefit of using them is (despite asking numerous people).

However, there's no denying their explosive popularity, so I've decided to jump in and try and "learn" one, to see if I can grasp what these supposed benefits are.

When learning something, I find it difficult to just "press on" when I hit something I don't really understand, and that's what's happened, which brings me here.

I'm working my way through the official CodeIgniter user manual, and have come across two things so far, that I would really like some answers on, if I may.

Number one:

The user manual gives a tip on how to remove the need to have 'index.php' appear in every URI, by suggesting the following:

Quote:By default, the index.php file will be included in your URLs:
example.com/index.php/news/article/my_article

You can easily remove this file by using a .htaccess file with some simple rules. Here is an example of such a file, using the "negative" method in which everything is redirected except the specified items:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Doesn't work for me. When I create a .htaccess file and put just that bit of code in it, I get an error no matter what I am trying to load: "Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again."

Second question:

In the "Views" section of the manual, the following code appears:

Quote:<?php
class Blog extends Controller {

function index()
{
$this->load->view('blogview');
}
}
?>

Specifically, this bit:
Quote:$this->load->view('blogview');
I've never seen OO PHP structured like this (granted, my OO experience is limited). "$this" obviously refers to the instance of the object, "view('blogview')" obviously refers to a method called "view" and 'blogview' is the parameter.

But what the heck is 'load'? I've never seen OO PHP written this way before.

Thanks in advance.


Messages In This Thread
Absolute "noob" questions - by El Forum - 10-28-2008, 09:49 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 10:04 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 10:20 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 10:33 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 10:52 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 11:07 AM
Absolute "noob" questions - by El Forum - 10-28-2008, 12:31 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 12:37 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 01:19 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:24 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:27 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:35 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:36 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:45 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 03:47 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:11 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:24 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:32 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:37 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:46 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:49 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 04:58 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 05:03 PM
Absolute "noob" questions - by El Forum - 10-28-2008, 05:54 PM
Absolute "noob" questions - by El Forum - 10-31-2008, 11:28 PM
Absolute "noob" questions - by El Forum - 10-31-2008, 11:34 PM
Absolute "noob" questions - by El Forum - 10-31-2008, 11:37 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:10 AM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:25 AM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:21 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:27 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:29 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:29 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 12:31 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 05:34 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 06:51 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 06:56 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 06:57 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 07:04 PM
Absolute "noob" questions - by El Forum - 11-01-2008, 07:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB