Search Results

Search found 981 results on 40 pages for 'codeigniter'.

Page 5/40 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • possible to make codeigniter work with another framework?

    - by ajsie
    the situation is this. my client (who also is a programmer) asks me to develop an address book (with mysql database) with a lot of functions. then he can interact with some class methods i provide for him. kinda like an API. the situation is that the address book application is getting bigger and bigger, and i feel like its way better to use CodeIgniter to code it with MVC. i wonder if i can use codeigniter, then in some way give him the access to controller methods. eg. in a controller there are some functions u can call with the web browser. public function create_contact($information) {..} public function delete_contact($id) {..} public function get_contact($id) {..} however, these are just callable from web browser. how can i let my client have access to these functions like an API? then in his own application he can use: $result = $address_book-create_contact($information); if($result) { echo "Success"; } $contact = $address_book-get_contact($id); is this possible? cause i just know how to access the controller methods with the webbrowser. and i guess its not an option for him to use header(location) to access them. all suggestions to make this possible are welcomed! thanks

    Read the article

  • codeigniter cron job with http access

    - by user1313850
    Sorry if this is a duplicate question...I've searched around and found similar advice but nothing that helps my exact problem. And please excuse the noob questions, CRON is a new thing for me. I have a codeigniter script that scrapes the html DOM of another site and stores some of that in a database. I'd like to run this script at a regular interval. This has lead me to looking into cron jobs. The page I have is at myserver.com/index.php/update I realize I can run a cron job with curl and run this page. If I want to be a bit more secure I can put a string at the end like: myserver.com/index.php/update/asdfh2784fufds And check for that in my CI controller. This seems like it would be mostly secure, but doesn't seem like the "right" way to do things. I've looked into running CI from the command line, and can execute basic pages like: php index.php mycontroller But when I try to do: php index.php update It doesn't work. I suspect this is because it needs to use HTTP to scrape the DOM of the outside page. So, my question: How do I securely run a codeigniter script with a cron job that needs HTTP access?

    Read the article

  • CodeIgniter: Passing variables via URL - alternatives to using GET

    - by John Durrant
    I'm new to CodeIgniter and have just discovered the difficulties using the GET method of passing variables via the URL (e.g. domain.com/page.php?var1=1&var2=2). I gather that one approach is to pass the variables in the URI segments but haven't quite figured out how to do that yet as it seems to create the expectation of having a function in the controller named as the specific URI segment???? Anyway Instead of using GET I've decided to use POST by adapting a submit button (disguised as a link) with the variables in hidden input fields. I've created the following solution which seems to work fine, but am wondering whether I'm on the right track here or whether there is an easier way of passing variables via a link within CodeIgniter? I've created the following class in application/libraries/ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class C_variables { function variables_via_link($action, $link_text, $style, $link_data) { $attributes = array('style' => 'margin:0; padding:0; display: inline;'); echo form_open($action, $attributes); $attributes = array('class' => $style, 'name' => 'link'); echo form_submit($attributes, $link_text); foreach ($link_data as $key => $value){ echo form_hidden($key, $value); } echo form_close(); } } ?> With the following CSS: /* SUBMIT BUTTON AS LINK adapted from thread: http://forums.digitalpoint.com/showthread.php?t=403667 Cross browser support (apparently). */ .submit_as_link { background: transparent; border-top: 0; border-right: 0; border-bottom: 1px solid #00F; border-left: 0; color: #00F; display: inline; margin: 0; padding: 0; cursor: hand /* Added to show hand when hovering */ } *:first-child+html .submit_as_link { /* hack needed for IE 7 */ border-bottom: 0; text-decoration: underline; } * html .submit_as_link { /* hack needed for IE 5/6 */ border-bottom: 0; text-decoration: underline; } Link then created using the following code in the VIEW: <?php $link = new C_variables; $link_data=array('var1' => 1, 'var2' => 2); $link ->variables_via_link('destination_page', 'here is a link!', 'submit_as_link', $link_data); ?> Thanks for your help...

    Read the article

  • codeigniter - Page with multiple forms

    - by Christian
    Hi, I'm new to codeigniter this is my case: I have a homepage with a list of items, I can navigate through pagination, but I have in my sidebar a login form, it's possible to return to the same page after try to login in the case that is valid or not with a validation message. for the login option I have a controller and login function but I don't know what view load after validation. I need to login in any controller and return to the same url. thanks

    Read the article

  • Codeigniter multilanguage and adding the language to the url for seo

    - by Jayapal Chandran
    Hi, I read this http://stackoverflow.com/questions/1328420/the-best-way-to-make-codeigniter-website-multi-language-calling-from-lang-arrays for language inclusion... i wonder how the url will appear for multi languages... How to show the language in url so that it will also be indexed in search engines... for example sitenameDOTcom/es or sitenameDOTcom/whoweare/es or something like this and how to sync with the controllers and the urls...

    Read the article

  • [codeigniter] extra white space

    - by Wiika
    Hi all, i getting extra space at the beginning of page ( output ), the thing is i didn't edit any file, i just uploaded the codeigniter framework to my server, and in the welcome page i get that space , in localhost i don't get it, i changed all files to utf8, checked if there is any space before ( there is no ? ) did someone had to deal with this issue before ?

    Read the article

  • Codeigniter initializing multiple times per page load

    - by Clayton
    I'm using Codeigniter for my application and have something wrong with my configuration. When I load a page, the framework initializes several times (see logs below). I have built other applications with Codeigniter and have never seen this behavior before. Log output: DEBUG - 2010-03-27 14:50:32 --> Config Class Initialized DEBUG - 2010-03-27 14:50:32 --> Hooks Class Initialized DEBUG - 2010-03-27 14:50:32 --> URI Class Initialized DEBUG - 2010-03-27 14:50:32 --> Router Class Initialized DEBUG - 2010-03-27 14:50:32 --> Output Class Initialized DEBUG - 2010-03-27 14:50:32 --> Input Class Initialized DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Global POST and COOKIE data sanitized DEBUG - 2010-03-27 14:50:32 --> Language Class Initialized DEBUG - 2010-03-27 14:50:32 --> Loader Class Initialized DEBUG - 2010-03-27 14:50:32 --> Config file loaded: config/redux_auth.php DEBUG - 2010-03-27 14:50:32 --> Config file loaded: config/email.php DEBUG - 2010-03-27 14:50:32 --> Helper loaded: url_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: form_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: html_helper DEBUG - 2010-03-27 14:50:32 --> Database Driver Class Initialized DEBUG - 2010-03-27 14:50:32 --> Session Class Initialized DEBUG - 2010-03-27 14:50:32 --> Helper loaded: string_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: file_helper DEBUG - 2010-03-27 14:50:32 --> Session routines successfully run DEBUG - 2010-03-27 14:50:32 --> Form Validation Class Initialized DEBUG - 2010-03-27 14:50:32 --> Model Class Initialized DEBUG - 2010-03-27 14:50:32 --> Controller Class Initialized DEBUG - 2010-03-27 14:50:32 --> Language file loaded: language/english/form_validation_lang.php DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Config Class Initialized DEBUG - 2010-03-27 14:50:32 --> Hooks Class Initialized DEBUG - 2010-03-27 14:50:32 --> URI Class Initialized DEBUG - 2010-03-27 14:50:32 --> Router Class Initialized DEBUG - 2010-03-27 14:50:32 --> Output Class Initialized DEBUG - 2010-03-27 14:50:32 --> Input Class Initialized DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Global POST and COOKIE data sanitized DEBUG - 2010-03-27 14:50:32 --> Language Class Initialized DEBUG - 2010-03-27 14:50:32 --> Loader Class Initialized ... This repeats three more times

    Read the article

  • CodeIgniter's form_hidden

    - by 01010011
    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.

    Read the article

  • Method/function overrides in Codeigniter

    - by pingu
    Hi guys, I want to override the validation_errors() method of the form helper in CodeIgniter for one controller only, so that it will display a single error message (as a sentence in plain english) instead of the detailed line item summary. I've tried defining a validation_errors() function in my controller, which is what I usually do with Silverstripe's Sapphire framework, but this won't with CI. What's the best way to override methods for a case by case basis?

    Read the article

  • Idea: CodeIgniter codecompletion in Eclipse

    - by ToS
    I just figured out that all code completion for Eclipse is stored in plain files located here (example): .\eclipse\plugins\org.eclipse.php.core_2.1.1.v20090921-1100\Resources\language I tried adding global variables like $_POST, $_GET, $_SERVER to the end of basic.php but without any luck (did try to restart Eclipse). Is there a way to create compatible files for the needs of "smooth integration" of (ie.)CodeIgniter framework by adding or changing files located here and how would it be done?

    Read the article

  • Using memcached as a session storage with CodeIgniter

    - by Alex N.
    I am researching possibilities of using memcached as a session storage for a system built on CodeIgniter. Has anybody done this before(that's probably a stupid question :) and if so what's your experience folks? Have you used any existing libraries/extensions? As far as performance improvement what have you seen? Any caveats?

    Read the article

  • Creating a mobile version for my web app in CodeIgniter

    - by KeyStroke
    Hi there, I'm using CodeIgniter to develop a new web app, and I'd like to create a mobile version that users get redirect to when they visit it from their phones. The mobile version of the app should have a different flow, so swapping CSS/HTML files in the code is not an option for me since the mobile version and the web version will handle things differently in their Controllers and Views, while sharing the same Models. Anyway how I could do this efficiently? Your help is much appreciated. :)

    Read the article

  • Multi-Part form in Codeigniter

    - by Kevin Brown
    I'm building a survey w/ Codeigniter, and it's getting cumbersomely long...so I want to split it up into sections (about 5). If I want each section to validate, and submit to db after the user clicks "next", what is the best way to do this? I've never made a multi-step process before. Any advice for a noob? :)

    Read the article

  • Codeigniter validation help

    - by Drew McGhie
    I'm writing a system where users can generate/run queries on demand based on the values of 4 dropdown lists. The lists are dynamically generated based on a number of factors, but at this point, I'm having problems validating the input using codeigniter's built in validation classes. I think I have things out of order, and I've tried looking at the codeigniter site, but I think I'm tripping myself up. in my view(/dashboard/dashboard_index.php), I have the following code block: <?=form_open('dashboard/dashboard_add');?> <select ... name='selMetric'> <select ... name='selPeriod'> <select ... name='selSpan'> <select ... name='selTactic'> <input type="submit" name="submit_new_query" value="Add New Graph" class="minbutton" ></input> <?=form_close();?> Then in my controller, I have the following 2 methods: function index() { $this->load->helper(array('form', 'url')); $this->load->library('validation'); //population of $data $this->load->tile('dashboard/dashboard_index', $data); } function dashboard_add() { $rules['selMetric'] = "callback_sel_check"; $rules['selPeriod'] = "callback_sel_check"; $rules['selSpan'] = "callback_sel_check"; $rules['selTactic'] = "callback_sel_check"; $this->validation->set_rules($rules); $fields['selMetric'] = "Metric"; $fields['selPeriod'] = "Time Period"; $fields['selSpan'] = "Time Span"; $fields['selTactic'] = "Tactic"; $this->validation->set_fields($fields); if ($this->validation->run() == false) { $this->index(); } else { //do stuff with validation information } } Here's my issue. I can get the stuff to validate correctly, but for the number of errors I have, I get Unable to access an error message corresponding to your field name. as the error message for everything. I think my issue that I have the $rules and $fields stuff in the wrong place, but I've tried a few permutations and I just keep getting it wrong. I was hoping I could get some advice on the correct place to put things.

    Read the article

  • CodeIgniter, Unit Testing, and Continuous Integration

    - by blork
    As part of a University project, my team and I have to set up automated unit testing with CruiseControl.rb. We chose to use CodeIgniter for the project, and are having some problems getting everything working together. Does anyone have experience setting up such a configuration? Some of the unit testing frameworks we've tried are: PHPUnit SimpleTest Toast ...but we've had no success with any of them.

    Read the article

  • is thera a codeigniter api reference?

    - by ajsie
    whenever using a framework it's so good with a api reference so you could lookup the classes' methods and properties, which class they extend from and so on. is there a api reference for codeigniter similar to yii's excellent api referenc? http://www.yiiframework.com/doc/api/ thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >