codeigniter

codeigniter routes

北战南征 提交于 2019-12-23 06:07:52
问题 need next: I use codeigniter 2.02 I removes index.php with htaccess I have controller post and with route $route['(:any)'] = "post/index/$1"; And I get what I want: domain.com/14 in place of domain.com/post/14 BUT now I have next controllers that I want like: login, member etc. But if I go to domain.com/login I'm redirected to domain.com ... so if someone can get me solution so I can go to login controller... with some regular expression with routes! this is my routes: $route['default

Codeigniter Google Maps API V3 Geocoding not working

痞子三分冷 提交于 2019-12-23 06:01:45
问题 I'm trying to use Biostall's Google Maps v3 API to map out a series of addresses, but when I try to type in an address, the Lon Lat produced is 0, 0 every time. It only works if I specifically put in the longitude and latitude of each address. Even the entries which Biostall used on his example video and documentation don't work. I'm trying to also use the geocodeCaching feature, please help. $this->load->library('googlemaps'); $config = array(); $config['zoom'] = 'auto'; $config[

Passing a variable from one page to another in php to dynamically populate Facebook open tags

不羁岁月 提交于 2019-12-23 05:42:25
问题 I want to dynamically populate data in Facebook open tags. For this, I need to pass a variable from my controller file to a file which is outside the CI model. How to do this? public function index() { $data['clients'] = $this->qua_model->list_clients(); $data['clientst'] = $this->qua_model->list_clientst(); $id = $this->uri->segment(3); //GET RECORD BY ID $data['result']=$this->qua_model->get_record_by_id($id); // print_r($data['result']); $data['url']= urlencode(base_url().'intermediate.php

Codeigniter, Join and Case When Query

断了今生、忘了曾经 提交于 2019-12-23 05:33:07
问题 Trying to Execute this query. $sql ="SELECT '*' FROM 'osp_job_details' LEFT JOIN 'osp_job_status_track' ON 'osp_job_status_track'.'JobID' = 'osp_job_details'.'JobID' LEFT JOIN 'osp_job_status' ON 'osp_job_status'.'StatusID' = 'osp_job_status_track'.'StatusID' LEFT JOIN 'osp_job_sub_status' ON 'osp_job_sub_status'.'SubStatusID' = 'osp_job_status_track'.'SubStatusID' LEFT JOIN 'hr_employee_details' ON 'hr_employee_details'.'EmployeeID' = 'osp_job_details'.'AssignToEmployeeID' LEFT JOIN 'osp_job

MongoDb error with php 7 on xampp CodeIgniter

戏子无情 提交于 2019-12-23 05:31:51
问题 I am getting the following error when running the app in xampp with Php 7. I am new to mongoDb. Can't figure out what might solve this issue. Any help or suggestion about the problem will be highly appreciated. Thank you for your help. Below is the code I believe have some issue. Error: An uncaught Exception was encountered Type: Error Message: Class 'MongoClient' not found Filename: C:\xampp\htdocs\Web\application\libraries\Mongo_db.php Line Number: 49 Backtrace: File: C:\xampp\htdocs\Web

Codeigniter URL trailing slash breaks in subfolder

烈酒焚心 提交于 2019-12-23 05:30:15
问题 I have a site based on Codeigniter, and when I'm in the default directory, www.removed.com... I have no problem. If I go here: www.removed.com/ It works just fine. The problem is when I navigate to the /admin folder (which is really just application/controllers/admin/dashboard.php..... routed correctly in the routes config. If I add a trailing slash to the end of anything under admin (like removed.com/admin/users/), the whole site breaks and the url tries inserting a url relative to my root:

serving different content based on the domain in codeigniter

爷,独闯天下 提交于 2019-12-23 05:26:35
问题 I'm going to develop a website in codeigniter. But not sure if the methor i'm going to use is the best approach. There will be many addon domains for the same site. But content will be filtered based on the domain used to visit the site. For Example If a user comes from the domain siteusa.com then the content will be shown filtered accordingly specific user. If the user comes from siteuk.com/sitechina.com the content will be filetered accordingly etc... I'm planning to do something like this

Getting the same data on pagination in Codeigniter

不羁的心 提交于 2019-12-23 05:14:47
问题 I am getting the same data when I am clicking on the next button of pagination in CodeIgniter with the following code public function view($slug){ $data['title']= $slug; $data['description']= "None"; $postdatacount = $this->Constant_model->snippettagscount($slug); $checktags= $this->Constant_model->gettags($slug); if($checktags>0){ if ($postdatacount>0) { $config = array(); $config["base_url"] = base_url() ."tags/".$slug; $config["total_rows"] = $postdatacount; $config["per_page"] = 6;

Codeigniter view show progress

心不动则不痛 提交于 2019-12-23 05:05:53
问题 I am using Codeigniter and want to show progress of XML import. but issue i am facing is When view load, it stuck on loading (blank page) and when i can see view its shows 100% done. my code as bellow $i=0; $count=sizeof($record->List); foreach($record->List as $Item) { $i++; echo "processing ".$i." of ".$count; ---processing code which takes times to process--- ---processing code which takes times to process--- } this code is in view but when i click on link to load this view, i have to wait

Codeigniter update new image in database column without replace old one

北城余情 提交于 2019-12-23 04:55:18
问题 I am updating image files but when i update new one it replace old one.i want to keep all without replacing. for example if i remove one of them and add new one it update column value with one and remove old one..i need all of them. Here My Upload Code: $picture=array(); $cpt = count($_FILES['my_image_upload']['name']); $config['upload_path'] = APPPATH.'uploads/'; $config['allowed_types'] = '*'; $files = $_FILES; for($i=0; $i<$cpt; $i++) { if($_FILES['my_image_upload']['name'][$i]!='') { $