codeigniter

CODEIGNITER :: how to save 2 configs for 1 library ?

hello i want to use upload library, but i want to use it in 2 separate uploads .. for example avatar and profile picture. each one of them has it's configs .... my application is v.big so it's better to save the upload configs library in a config file. but how can i save 2 configs in the same config file and load 1 of them at a time? ...

CodeIgniter passing dynamic data from controller to view.

I am passing an array to a view from a controller. Simple stuff. Should work, but is behaving rather too strangely and I cannot figure out the bug. This is the controller- $link = "http://" . $server . ".something.com/uploads/" . $name; $data = array( 'name' =>$name, 'server'=>$server, 'link'=>$link, 'username'=>$userna...

How can change {multilingual-text} into __(Multilingual Text) in CodeIgniter?

I followed this tutorial about internationalization and localization in CodeIgniter. The final view file looks like this: <head> <title>{title}</title> </head> <body> <h1>{title}</h1> <p>{description}</p> <a href="">{homepage}</a> </body> How do I make the default language the string? For instance: <html> <...

CodeIgniter - php variable in a view (img src = a php variable) not working

<img src = "<?= $link ?>"></img> Short tags is enabled in php.ini and in config.php of codeigniter. Also tried <img src = "<?php echo $link; ?>"></img> but doesn't work. In the HTML output its just "", although a simple <?php echo $link; ?> does work. ...

What's the Best method of checking Site / Server Uptime Efficiently (PHP)

I am trying to build a system of monitoring site / server uptime in PHP, the system will be required to check thousands of domains / ips a minute. I have looked into cURL as this seems to be the best method. Edit: The system will be required to probe a server, check its response time is reasonable, and return its response code. It will...

Implementing jquery upload plugin 'uploadify' with codeigniter

How can i implement this in codeigniter?Uploadify(Jquery) I mean what will be the controller? Hows the progress tracked? And what will happen if flashplayer is not installed by the user? And How do i check progess? Have any one tried this with codeigniter? ...

php code not embedded properly

Hello, I am using CodeIgniter for PHP. Can anybody tell me why is this code not working properly? <form action="/TestCodeIgniter/index.php/blog/comment_insert/<?php $this->uri->segment(3);?>" method="post"> However, this code works fine :- <?php echo form_open('blog/comment_insert/' . $this->uri->segment(3) ); ?> I am very much ...

require_once and include_once not resolving files correctly.

Am having problems with PHP's require_once, require, include_once and include functions not correctly resolving a file. I am running PHP 5.3.1 on Windows Vista with Apache 2.2.11. These are the problems I am getting: file_exists('C:/wamp/www/park_factor_network/system/application/shared/config/language.php') returns TRUE is_readable...

How do I load a view from a specific (shared) path in CodeIgniter?

I'm using CodeIgniter for several projects. What I haven't figured out how to do is have "shared" views across projects. For example, I'd like to be able to do something like this: $this->load->view ("mysharedview"); Where mysharedview.php does not exist in my project's application/views folder, but in a shared location that is used ...

How to use a common header in several sub domains

My application has several modules. Each module is hosted in a different sub domain. eg: subdomain1/abc.com subdomain2/abc.com subdomain3/abc.com I want to use a common header file, among the pages in other modules also. How can I do that. ...

Codeigniter form_validation help

Hi there I am having a problem with my form validation, basically the problem is that I am getting a repeated view loaded if the validation fails, please see my code snippet, else { //the user is a new customer so we need to show them //the card details form $this->addViewData('returningCustomer', f...

MySQL get rows, but for any matching get the latest version

I'm developing a CMS, and implementing versioning by adding a new entry to the database with the current timestamp. My table is set up as follows: id | page | section | timestamp | content "Page" is the page being accessed, which is either the path to the page ($page_name below), or '/' (to indicate 'global' fields). "Section" is t...

How does CodeIgniter output caching work?

Hello, I read this link :- http://codeigniter.com/user_guide/general/caching.html It is written that :- When a page is loaded for the first time, the cache file will be written to your system/cache folder and that we can cache a view by $this->output->cache(60);. But how does it actually work? What if regularly my users keep updatin...

codeigniter setting up a password!

Hello there! I try to set up a password in a codeigniter form... Everything seems ok to my eyes but no matter which password I use the form is still submitted... here is the code in the controler: class MyBlog extends Controller{ function MyBlog(){ parent::Controller(); $this->load->helper(array('url','form','html'))...

How can I fix CodeIgniter from tinkering with my internal links to pictures?

I am using the CodeIgniter framework to work on my latest website. In my views, I am trying to load graphics from another folder, external of the CodeIgniter installation. However, CodeIgniter is rewriting the links when I use absolute links to the resources. Is there a way I can configure it to allow absolute links, rather than re-wri...

Codeigniter form validation class

hi y'all, I have a funny thing going on with my local dev setup. Using codeigniter I have a form that should simulate storing some info from a user in a database. At this point I don't have the database setup yet I just want the form to send me to the success page when the validation is complete. But when I submit the form it comes back...

FTP Upload and Download via PHP

What's the best way to implement FTP upload and download in PHP? I'm using CodeIgniter and have Zend libraries. ...

Lost OnChange after form Validation

Hi, I'm using codeigniter and when selecting a dropdown form onchange works and i get my second field ok(Country->City). When i submit the form with errors, the page reloads with the errors displayed but my onchange stops working. Any ideas for what's going on? Hmm, here's what i'm doing. User get's to homepage and fills the form, the on...

Sharing controllers, models and views between separate projects in CodeIgniter

Kohana, due to cascading file system and modules, allows to share code in common projects, that contains controllers, views and models directories. How can I do it in codeigniter? I want to create sites, that will share some code (admin area views, some models). That is easy in Kohana, we just have to add another directory for Kohana::fi...

jquery lightbox in codeigniter help

am having a hard time trying to make jquery lightbox in codeigniter work, what I want to happen is,pop a youtube thumbnail and play the video on the lightbox.I stored it outside my application directory,I included it in my config file like this $config['jquery'] = "js/jquery1.4.2.js"; then I include on the view file like this <script t...