Archive

Posts Tagged ‘CodeIgniter’

CodeIgniter: Your recaptcha.php file does not appear to contain a valid configuration array

October 28th, 2013 No comments

For those who have run into this problem as I do, check the settings for PHP marker (<? and <?=).
If not activated, you will see this error because they are placed in reCAPTCHA scripts.

Modify “<?” into “<?php” and “<?=” into “<?php echo” and everything will be fine.
The other option is to allow shorter markers.

Categories: PHP Tags: ,

Get the controller and method name in CodeIgniter

May 10th, 2013 No comments

CI contains functions which see the link structure and extracting from it the name of the controller and the method that are called. These are the functions:

$this->Router->fetch_class(); // Class = controller
$this->Router->fetch_method();
[/ code]

What is important, if you are using CI routing, these two functions will recognize this and send you the correct name of the controller and its methods. Example:

For link:
http://www.onlineshop.com/product/samsung-s3-case/123
Routing redirects to:
http://www.onlineshop.com/products/view/123/
CI will return as a controller “products” and as a method “view” .

For more data about routing, go to CI URI Routing.

Categories: PHP Tags: , ,

(srpski) Rukovanje greŇ°kama u Code Igniter-u

January 7th, 2012 1 comment

Sorry, this entry is only available in Serbian.

Categories: PHP Tags: , ,