codeigniter-2

CodeIgniter: urlencoded URL in URI segment does not work

流过昼夜 提交于 2019-12-11 10:36:05
问题 I'm trying to put a URL as the value of one of my URI segments in CI. My controller method is defined to accept such an argument. However, when I go to the URL, I get a 404 error. For example: www.domain.com/foo/urlencoded-url/ Any ideas what's wrong? Should I do this via GET instead? UPDATE: // URL that generates 404 http://localhost/myapp/profile_manager/confirm_profile_parent_delete/ugpp_533333338/http%3A%2F%2Flocalhost%2Fmyapp%2Fdashboard%2F // This is in my profile_manager controller

CodeIgniter on 1and1 Error Reporting

被刻印的时光 ゝ 提交于 2019-12-11 09:45:04
问题 I made a website with CodeIgniter and I am currently hosting it with 1and1 . During development, everything looked golden. Only if all hosts were as reliable as localhost. I am looking to get the PHP error logs from the site. Unfortunately, 1and1 does not allot access to their Apache logs. How can I get error logs? Debugging fatal errors is a pain without logs. What I have tried? The custom error logging function Modifying the local PHP.ini to allow/log errors Used php5 by adding the

I cant upload Multiple file upload in codeigniter

荒凉一梦 提交于 2019-12-11 07:57:21
问题 This is my view (html) content <tr> <td width="341" class="linkssubhead"> Subcategory Image <span class="errormsg">*</span> </td> <td width="965" align="left"> <input type="file" name="subcategory_image" value="" class="required" />  <span class="errormsg"><?php echo $file_error ; ?> </span> </td> </tr> <tr> <td width="341" class="linkssubhead"> Subcategory Banner Image <span class="errormsg">*</span> </td> <td width="965" align="left"> <input type="file" name="subcategory_banner_image" value

Remove url segment in codeigniter with .htaccess

梦想与她 提交于 2019-12-11 07:27:07
问题 I uploaded a Codeigniter project to /dev folder and the old url was http://example.com/dev . But now i moved the project to root folder. So the updated url is http://example.com . How can i redirect old url to new url by editing .htaccess file. Can i remove the url segment /dev/ from url like removing index.php i tried this method by adding the below code to .htaccess RewriteEngine on RewriteBase / RewriteRule ^/dev/(.+)$ /$1 [L,QSA] but didnt work 回答1: use this as .htaccess file

AR get own posts and friends posts

廉价感情. 提交于 2019-12-11 06:59:30
问题 I have these tables; user - contains user_id | username | fullname | email etcc user_followers - contains follow_id| user_id | follower_id | date etcc posts - contains post_id | user_id | post | post_date I’m trying to grab all the posts by the users the user is following and the user’s own posts. I’ve tried $this->db->select('posts.*')->from('posts') ->join('user_followers', 'user_followers.user_id = posts.user_id', 'INNER') ->where('user_followers.follower_id', $user_id)->order_by('posts

Removing index.php from codeigniter-2

时间秒杀一切 提交于 2019-12-11 06:58:44
问题 I am having problems removing index.php from codeigniter-2. I remember using the same code before too & it worked perfectly fine, but it is not working on codeigniter-2. I have checked the documentation & this question too, still of no help. My .htaccess code is as follows: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond $1 !^(index\.php|images

Can't load css stylesheet in Codeigniter

不羁岁月 提交于 2019-12-11 06:29:47
问题 I have main CSS stylesheet for CI views, when but when load another link and switch to another page, Codeigniter have problem to locate css style-sheet? CSS is classically linked in header, did not used frameworks helpers like base_url(); 回答1: loading CSS will be href= "<?php echo base_url()?>assets/css/stylesheet.css" And file structure would be like this application assets css stylesheet.css system index.php Note Make sure Base Url is set correctly. 来源: https://stackoverflow.com/questions

html formatted emailing in codeigniter

一曲冷凌霜 提交于 2019-12-11 06:27:22
问题 how to send html formatted email in codeigniter i have this code which is sending email fine but it is not formatting it as it should look! you can see the picture which displays email received function email_sender() { // $this->load->helper('form'); // $this->load->helper('url'); $config = Array( 'protocol' => 'sendmail', 'smtp_host' => 'ssl://smtp.gmail.com', 'smtp_port' => '465', 'smtp_timeout' => '7', 'smtp_user' => '****@****.com', 'smtp_pass' => '*******', 'charset' =>'utf-8', 'newline

Codeigniter 2.0 default controller for sub folder not working in server but working in localhost

筅森魡賤 提交于 2019-12-11 06:14:55
问题 I have set up a virtual host in my local machine (assume it to be http://local.he). I have a home.php in the main ‘controllers’ folder. I have two subfolders inside the ‘controllers’ folder and they are ‘admin’ and ‘wori’ and each has a home.php file. Per CI 2.0 structure, if I access http://local.he/module/wori then it should load home.php from ‘wori’ and it is working but when I did the same in the server after uploading the files it always loads from module. Even if I access something like

Is there a Codeigniter library that can automatically generate a QR code with a custom logo in the center?

雨燕双飞 提交于 2019-12-11 05:35:12
问题 Is there a Codeigniter library that can automatically generate a QR code with my website's logo in the center? 回答1: This library might help; it also includes some examples (updated in January 2012) - https://github.com/dwisetiyadi/CodeIgniter-PHP-QR-Code 来源: https://stackoverflow.com/questions/8686802/is-there-a-codeigniter-library-that-can-automatically-generate-a-qr-code-with-a