codeigniter

CodeIgniter Facebook SDK 4 with Composer

主宰稳场 提交于 2019-12-24 02:33:25
问题 I'm trying to install and run the Facebook SDK on CodeIgniter using Composer. CodeIgniter is installed and working nicely. Composer support was added by doing the following: curl -s http://getcomposer.org/installer | php touch composer.json Added the require lines to the composer.json file ( "facebook/php-sdk-v4" : "4.0.*" ) Ran composer update All went to plan. Composer created a /vendor folder, and the Facebook SDK is there. I then added Composer support to CodeIgniter by adding the line

Determine what is the level of chlid php

笑着哭i 提交于 2019-12-24 02:26:35
问题 I am trying to get parent child relation and successfully get that But I am stuck how to identify what is the level of the child. Here is my code public function getDownline($userid = null) { $category_data = array(); $where = array('parent_id' => $userid); $this->db->where($where); $category_query = $this->db->get('users')->result(); $category_data = array(); foreach ($category_query as $category) { $category_data[$category->id] = array($category); $children = $this->getDownline($category-

I am trying to display data dynamically id sing ajax

爱⌒轻易说出口 提交于 2019-12-24 02:22:04
问题 Controller: In that i am used two table category and secound sub_category In category I am fetched category name to display dynamically In Sub_Category I am fetched image,price,title public function product_grid() { $id= $this->input->post('dataid'); echo 'Data-Id is form controller: '.$id ; $this->PizzaUp_User_model->getid($id); $data['res'] = $this->PizzaUp_User_model->select('category'); $data['rs'] = $this->PizzaUp_User_model->get_cetegory('sub_category'); $this->load->view('product_grid'

How to store path image users into a database: Codeigniter

南笙酒味 提交于 2019-12-24 02:18:54
问题 I am trying to upload the paths of the pictures for different users into at database. I am quite new on codeigniter and I read a lot of tutorials, but I am sill struggling. This is my controller but I don't even know how to link the image with the user session. Here is my code: function do_upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|jpeg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $config['overwrite

Returning and using multidimensional array of records from database in CodeIgniter 2.0

倾然丶 夕夏残阳落幕 提交于 2019-12-24 02:18:47
问题 Hey guys ! Well I was trying out codeigniter but it seems to me that I have made some kind of mess while trying to retrieve and display the data from the tables here is the code snippet. I want to retrieve all the articles stored in my article table along with that I need to pull out all the tags associated with each article from the relationship table and the tag table called articleTagRelation and tags respectively Table structure : Article table : articleID, articleContent, date Tags table

Codeigniter RESTful API Server

老子叫甜甜 提交于 2019-12-24 02:18:18
问题 I'm trying to create the RESTful API server in Codeigniter. So far, i followed the instructions i got from here https://github.com/philsturgeon/codeigniter-restserver . So far so good, I created a simple controller to test, so i build a hello.php: <?php include(APPPATH.'libraries/REST_Controller.php'); class Hello extends REST_Controller { function world_get() { $data->name = "TESTNAME"; $this->response($data); } } ?> When I try to run it by entering http://localhost/peojects/ci/index.php

Multiple image upload with Codeigniter saving only one file path to MySQL Database

两盒软妹~` 提交于 2019-12-24 02:17:16
问题 Now I'm building an application. I have set up a form that will upload multiple image to database. This is my simple code View <?php echo form_open_multipart('admin/product/post'); ?> <table class="table table-stripped"> <tbody> <tr> <td>Code</td> <td> <?php echo form_input(array('class'=>'form-control','name'=>'kodeproduk')); ?> </td> </tr> <tr> <td>Display</td> <td> <input class="form-control" type="file" name="userfile[]" id="multiple" multiple="" /> </td> </tr> <tr> <td>Description</td>

sending an url but staying on the same page ( php, codeigniter, javascript )

浪子不回头ぞ 提交于 2019-12-24 02:16:18
问题 this is my situation. I'm writing an webinterface in codeigniter to send commands to a virtual server. these commands are passed through the browser in an url. example : http://server.com/TgtSendIRCommand?id=UM-02&code=KEY_UP this server then takes action and the web interface refreshes the screenshot. i just want to have a bunch of links in html that send this command to the browser. But if i click the links, the user has to stay on the same page. So the command is sended but there is no

CodeIgniter RESTful API rate limiting issue

一世执手 提交于 2019-12-24 02:14:01
问题 I am working with the following code written by Phil Sturgeon here: https://github.com/philsturgeon/codeigniter-restserver No where in his docs can I see how the limit option is setup in side of the controller. the RESTController controller file has some references e.g. Line 654: https://github.com/philsturgeon/codeigniter-restserver/blob/master/application/libraries/REST_Controller.php Shows the protected function, additionally there is: // How many times can you get to this method an hour?

Getting typeError:e is undefined in firebug while running a script

柔情痞子 提交于 2019-12-24 01:57:42
问题 I am not able to figure out what is wrong with my code.I am getting data from post as an array and I am then displaying that data in box. function worker() { var a = $("#BeeperBox"); var delay =2000; $.ajax({ url: '/index.php/admin/getLatest', success: function(data) { $.each(data.upda,function(i, v){ var out = v.name + v.mob ; $('span.blueName').html(out); $("#BeeperBox").show(); timerId = setTimeout(function () { a.hide(); }, delay); }); }, complete: function() { // Schedule the next