Hi all,how to make an image as an anchor in codeigniter? I've tried the following code,
echo anchor("admin/conf/edit/".$list['id'],img(array('src' => '../img/edit.jpg', 'alt' => "")));
It gives me a grey box like in the Actions column
Thanks...
...
Hey
Where and how do I include .js files in Views in CodeIgniter?
I have tried this:
<script type="text/javascript" src="system/application/libraries/jquery.js"></script>
As I figured that the index.php is the one that is loading the views, so I'm guessing that every time a page is loaded the current dir path is at root because ind...
I have written an authentication class controller containing a method to check login status of user, and redirect him to login page if he/she is not logged in.
I need to call this function from other controller methods to authenticate the user. What is a good way to do that?
...
I’m using jquery to send text back to my ajax.php controller like this:
var dataString = "1234567890";
$.post(
'../ajax/save',
{ data: dataString },
function(){
alert("success");
},
"text");
It works well, that is until the dataString gets to be ~3500 characters long. At that upper limit (~3.5 KB), t...
I have the following db and php. I am tring to make a unodered list of category menu.
The orginal php is working by itself.
I am trying to convert this to MVC in codeigniter and the following is what I got so far and not working.
If someone can point out what I am doing wrong, I will apprecitate it.
Database
CREATE TABLE IF NOT EXISTS ...
hi to all
I have using codeigniter and jquery uploadify for my image gallery. It works fine in my localhost. My problem is when I uploaded into the server.
Any help would highly appreciated.
Thanks in advance
the error is:
'Data Loaded: <p>The path to the image is not correct.</p><p>Your server does not support the GD function requ...
class Email extends Controller {
function Email()
{
parent::Controller();
$this->load->library('email');
}
function index()
{
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_port'] = '465';
$config['smtp_timeout'] = '7';
$config['smtp_user'] = 'm...
I really like the named URLs in the Django Framework, and was wondering which of the PHP Frameworks supported such a thing. (I believe Zend Framework does, but please exclude that from your answers, without explanation).
For instance, in Django I can name a path like "/items/###" as "item-detail-page", which would point to a View 'func...
Hello Everyone,
Can someone help me with this. I'm feeling like I've been hitting my head against a wall for over 2 hrs now.
I've got Apache 2.2.8 + PHP 5.2.6 installed on my machine and the .htacces with code below works fine, no errors.
RewriteEngine on
RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots\.txt|favicon\.ico)
RewriteRul...
I have this function on my controller (Im using CodeIgniter) that reads the database, then produces a comma-delimited string that I feed on print() so the user can save/open the file.
On development, the export of about 2000+ records takes about 20-30 seconds. The problem is, on production, the request doesn't finish/goes to a blank pa...
Hi there,
I'm creating a file upload in CodeIgniter, that uploads the file to the server and then stores some data in the database.
I have a form that asks for a file name and the file, which then uses my upload.php controller to upload the file to the server. Currently this part is working, I just need to insert the file name (entered...
Hi,
I need to turn URL's like /catalog/products/24 into cleaner URL's like /catalog/product-name-here. I'm using codeigniter and rewrite engine is on and all setup. I also setup rewriting in the routes.php file like this:
$route['catalog/products/(:any)'] = 'catalog/view/$1';
My question is: where do I replace the product ID "/24" wi...
When coding Visual Studio, I can have multiple website projects, and to switch between them is as simple as opening each website project on the local drive.
I'm confused at how CodeIgniter handles this, it seems the programming environment is the actual install location (doesn't really have a "project" concept), and how do I start to co...
Hello, I'm developing a site on my localhost (Usbwebserver application). I'm using CodeIgniter framework:
url is "http://localhost/daniel/index.php"
with the following options:
config/routs:
$route['default_controller'] = "site";
config/config:
$config['base_url'] = "http://localhost/daniel";
$config['index_page'] = "";
$config['...
Hey everyone,
First off apologies for asking one of those A vs B questions that often plague internet forums but I'm in a bit of a dilemma as to what to study next. I've only been a developer professionally for 2 years (almost) and i'm trying to lay the foundation for perhaps doing some freelance work in the future.
Im currently stud...
I’m making a self-hosted downloadable web app using CodeIgniter and I’m looking for a way to automatically redirect to the installer if the database config file has not been filled out.
The problem is that CI errors out when it tries to connect to the DB (which it obviously can’t because it’s trying to load the database config file befo...
Ok, here's the specs:
Dev Server: Windows, WAMP, PHP 5+, Codeigniter
Live Server: Ubuntu Linux, PHP, CodeIgniter, LAMP
I get the following error in Firefox from my Live Server:
XML Parsing Error: junk after document element
Location: http://www.mysite.com/feed/rss2/
Line Number 2, Column 1:
*syntax error, unexpected T_STRING in ...r...
I'm making a downloadable self-hosted web app (using CodeIgniter), and need the .htaccess rewrite rule to be able to tell if it's in a subdirectory or not to be able to make the rewrite rule correctly.
For example, if the app is being installed at example.com, then the write rule will look like
RewriteRule ^(.*)$ /index.php/$1 [L]
I...
Using a user model which returns an array that looks like this:
$user_data['display_name'] = "John Doe";
$user_data['avatar'] = ./images/user144.jpg";
i create my session using $this->session->set_userdata('user_data',$user_data);
now if on another controller i let the user change his avatar,
how can i replace the session variable...
Hi friends, I don't know if this is a good place for such a question. If not, sorry for messing :/
I have been using Codeigniter for a while, I have already built my own cms (to use for all my projects) and many modules (news, image uploads, etc.) and I can do my work well and quick... but I always wanted Zend Framework actually. The re...