Hi All,
I am deciding on a framework to try out for PHP and have narrowed it down to CakePHP and CodeIgniter.
I have a couple questions for any of you who have used or are familiar with both:
I like the fact that Cake keeps most of the code outside the webroot by default. Especially since I may end up using a single framework instal...
I am having some trouble manipulating images using CodeIgniter 1.7. With the following code, the image is uploaded correctly, but, instead of a new image being made and then modified, the existing image is modified. Any help?
//Upload image first
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|bmp';
$th...
I'd like to receive error logs via email. For example, if a Warning-level error message should occur, I'd like to get an email about it.
How can I get that working in CI ?
Thanks,
Ian
...
In Ruby (forgive me for mentioning it's name), I noticed you could do a anchor link with "link to unless current", which would remove the link if it was the current page.
I know there's nothing built into CI to do something similar, but I'm trying to come up with the best way to do this. I've got a few options, but they're all too long...
Using CodeIgniter with persistent connections disabled.
...
I am about 2 minor revisions behind.
...
I am just getting stated with CodeIgniter and am trying to hash out my regular modules/functions and get them working properly within the mvc framework.
I have a few specific questions, if anyone has a strong background with CI:
SESSIONS
The CI session stores session data on the client side in a cookie, which just isn't going to wor...
I've built web apps before that utilize PhpBB session and user data. The common move is to use code like this:
define('IN_PHPBB', true);
//replace $phpbb_root_path with path to your forum
$phpbb_root_path = '../forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session managem...
I'm playing around with CodeIgniter, hoping to convert some of my old, ugly PHP into a more maintainable framework. However, I've come across a rather frustrating roadblock - I can't seem to define functions in my views. Any time I try I get a completely blank page back, and when I look in the debug log the processing seemed to stop afte...
Hi All,
I am building a PHP app in CodeIgniter. CI sends all requests to the main controller, /index.php.
However, I don't like to see the index.php in the URL, so I've used mod_rewrite, as per the CI documentation.
The rule is as follows:
RewriteEngine on
RewriteCond $1 !^(images|inc|favicon\.ico|index\.php|robots\.txt)
RewriteRu...
Hi All,
I usually just work with straight PHP, but want to try MVC and see if a framework will really speed up development.
After much waffling, analysis paralysis, and many dumb SO questions, I thought I had settled on CodeIgniter for my next PHP project.
However, I am now seriously considering Kohana.
Has anyone made the switch fro...
Hey folks -
I'm trying to upload an image to my site through a form, however it's much more efficient to (rather than bog down the database) just store the location of the image in the database.
I'm having trouble with my form and really don't know where to go:
<?=form_open('bro/submit_new');?>
//other form data
Image: <input type="...
Even though error_reporting is set to 0, database errors are still being printed to screen. Is there a setting somewhere I can change to disable database error reporting? This is for CodeIgniter v1.6.x
EDIT: Re: Fixing errors - Um, yes. I want to fix the errors. I get error notices from my error log, not from what my visitors see printe...
Hello,
I'm now trying to create a xml-rpc server with the CodeIgniter Framework.
<?php
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');
$config['functions']['weblogUpdates.ping'] = array('function' => 'weblogUpdates.ping');
$config['functions']['ping'] = array('function' => 'weblogUpdates.ping');
$config['functions']['...
CodeIgniter allows access to POSTed data via:
$this->input->post('input_name');
where 'input_name' is the name of a form field. This works well for a static form where each input name in known ahead of time.
In my case, I am loading a collection of key/value pairs from the database. The form contains a text input for each key/value p...
It's kind of embarassing that I find it so difficult to learn JavaScript, but ..
Let's say I have a really simple controller like this:
class front extends Controller {
public function __construct()
{
parent::Controller();
}
public function index()
{
//nothing!
}
public function test () {
...
i’m trying to create a url string that works like this:
/app/process/example.com/index.html
so in other words,
/app/process/$URL
i then retrieve the url with
$this->uri->segment(3);
the forward slashes in the URL will of course be a problem accessing uri segments, so i’ll go ahead and url encode the URL portion:
/app/process/e...
I am looking to use/connect to a different database for one of my controllers and one model. I posted this hear since on the forums of CI I am getting no response.
I added this in database.php:
$db['tdb']['hostname'] = "localhost";//localhost
$db['tdb']['username'] = "username";//root
$db['tdb']['password'] = "password";//empty
$db[...
How can I use a database and PHP sessions to store a user's shopping cart? I am using CodeIgniter, if that helps.
Example code would also be nice.
...
I think I might be approaching this in the wrong way, so I would appreciate any comments/guidance. Hopefully I can explain coherently enough what I am trying to achieve:
I want to create a block of HTML
(e.g. a box containing a user's
profile), which I will load as part
of my layout on most pages that I
generate.
I would also like to b...