codeigniter

apc.cache_by_default with CodeIgniter

I'm trying to use APC (Alternative PHP Cache) on my localhost with wamp 2, PHP 5.3 and CodeIgniter 1.7.2, however If I turn on cache_by_default and enable apc.stat the server will crash and I get the following error: [apc-error] Cannot redeclare class ci_benchmark in C:\wamp\www\k\mvc\codeigniter\Common.php on line 127. What ...

CodeIgniter PHP stylesheet link. HOW?

I'm using xampp for my php. And I have download a code igniter and save it on my htdocs. I already made a databasing and a sample page. My only problem is how can I link my css. Where should I save my style.css? How can I call my style.css? <link rel="stylesheet" href="<? base_url(); ?>stylesheet/style.css" type="text/css" media="scree...

Codeigniter Pagination: Run the Query Twice?

I'm using codeigniter and the pagination class. This is such a basic question, but I need to make sure I'm not missing something. In order to get the config items necessary to paginate results getting them from a MySQL database it's basically necessary to run the query twice is that right? In other words, you have to run the query to d...

Most effective way working with multiple natural languages

Hi! I am currently working with a codeigniter PHP based application and have come to the point where it's about to go off with multiple languages. Is codeigniters own language class the most effective way to handle languages? Is there any specific language-tools/libraries that are commonly used in PHP apps? Thanks! ...

Apache Benchmark and Codeigniter problem

Hi, When using something like: ab -n 1000 -c 10 h t t p : / / localhost / ci I get about 380 requests/sec. When using: ab -n 1000 -c 10 h t t p : / / localhost / ci / I get about 12 requests/sec. Does anyone knows what's going on? Thanks Edit: Tried HttpFox for Firefox and what i see is that when putting localhost/ci it shows a 3...

CodeIgniter: Sending params to a view?

Hello, My controls receives some params from the user, I would like to place them inside the view I'm calling, how should I do this without splitting the view into multiple parts? Thank you. ...

PHP in_array() can't even match a single character. Strict is set to true.

I've seen a million of these threads here already, and read through every single one. That, plus some serious Googling. UPDATE: I am rewriting this post to include complete code and explanation, so everyone understands what is going on and what I am trying to do. I am developing using CodeIgniter, so some syntax may look weird if you ...

CodeIgniter: Page not found when passing parameters to a controller???

Hello, I'm trying to pass parameters to a control in codeigniter, but I'm getting 404 page not found error, I don't get it, I did what the guide says: http://codeigniter.com/user_guide/general/controllers.html#passinguri When I remove the params in the index function and just access the controller everything works fine, but I can't pas...

Using a single PHP script for an entire site

I had an idea today (that millions of others have probably already had) of putting all the sites script into a single file, instead of having multiple, seperate ones. When submitting a form, there would also be a hidden field called something like 'action' which would represent which function in the file would handle it. I know that thi...

How should I name the controller in the following Language Class tutorial (CodeIgniter)?

The following is a great tutorial about using the Language Class. But I think the author forgot about creating the controller file. I just started using CI today and I'm not sure how to name the controller file for the view "example.php". The tutorial: http://codeigniter.com/wiki/Internationalization_and_the_Template_Parser_Class/ ...

How to add links that select the preferred language (CodeIgniter's Language Class)?

I just finished this tutorial: http://codeigniter.com/wiki/Internationalization_and_the_Template_Parser_Class/ but now I want some links to change english to spanish I know how to change it by modifying the controller example.php: # Load language $this->lang->load('example', 'english'); But I can't figure out how to do that in the...

Codeigniter Twitter Library : What is my Callback URL. Where can i find it?

I would like to know where i can find my callback url in ci? Im quite new to it so not really sure. Here is the lib im using. <?php class Home extends Controller { function Home() { parent::Controller(); } public function index() { // This is how we do a basic auth: // $this->twitter-...

How can I use GET forms with CodeIgniter?

I understand that CI is mostly URL segment based, but I want to have a query string: blahblah.com/search.html?q=keyword When I try $this->input->get( "q" ), it returns empty. Is there a route or something I need to configure? ...

CodeIgniter's form_hidden

Hi, How do I achieve this: //view.php <input type="hidden" name="Name" value="<?php echo $variable->id; ?>" using CodeIgniter’s form_hidden helper: //view.php <?php echo form_hidden('Name','<?php echo $variable->id; ?>') ?> The first one works fine when I display $variable->id but CI's form_hidden doesn't work. ...

make 2 thumbnails at once in codeigniter

hello everybody! can anyone tell me how to create 2 different thumbnails of same images with different sizes and location in codeigniter. I have created a upload function and another thumbnail generation function, it works fine but can't sort out how to create 2 different thumbnail at accordingly at once. any help will be appreciated. ...

how to secure my password in my registration form?

Hi how to secure my password in my "registration form" using salt and hash technique? And how the technique of salt and hash works? ...

Remove index.php in CodeIgniter

Hello. I'm trying to remove the 'index.php' from CI Urls. I've tried many solutions, none of them worked. I've already set these variables in 'config.php': $config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI"; And my current .htaccess is: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST...

Implementing a recursive menu system a'la Joomla in CodeIgniter

Hi I have some sites powered by Joomla, but with my current assignment I wanted to try something new and created with CodeIgniter a really basic CMS (just to suit my client's needs). Everything works fine except menus - multilevel menus like in Joomla, Drupal etc. with items and subitems... My question is: do you know of any tutorials o...

How do I insert a newline in email using codeigniter?

Hi all, I'm trying to send an email using codeigniter, and would like the message to span over several lines. $address = $this->input->post('email'); $subject = 'Please complete your registration'; $message = 'Thanks for registering! \n To complete your registration, please click on (or copy and paste in your browser) the following link...

How would i create a vanity url in codeigniter

How can i create a vanity url in codeigniter. Im having real trouble doing this in the framework. And there doesnt seem to be any good answers out there. ...