codeigniter

Codeigniter Class and filename case sensitive on Linux (centos)

浪尽此生 提交于 2019-12-29 01:24:50
问题 I am running into a case-sensitive problem that I'm not able to wrap my head around it appears. This is what my file structure looks like. I am only entering the directories that I am working with, but I am in fact using a full-install of CI3. /application .... /controllers/ application_controller.php /core/ MY_Controller.php Public_controller.php .... /models/ Application_model.php .... Here is what the class definition syntax looks like: /application/core/My_Controller.php class MY

CodeIgniter RESTful, async / background process

守給你的承諾、 提交于 2019-12-29 00:41:12
问题 I'm using codeIgniter RESTful API (https://github.com/philsturgeon/codeigniter-restserver) that return information (json format) to my android/iphone app. There are an operation where i send some values, if it is everything OK i return 200 code as response. Now, i want to add a new operation at the same method: send notifications of this modifications with APNS (Apple Push Notificacion Service) and GCM (Google Cloud Messaging). It works well when i have to send no more than 3-5 notifications,

Codeigniter 3 Remove index.php Problems

一个人想着一个人 提交于 2019-12-28 18:14:31
问题 I have a little project that i developed for a client in codeigniter 2.1.4 and now, he insists to migrate to codeigniter 3 DEV version. I know that's not a good ideea but... My problem is that i can't remove the index.php from the url. This is my .htaccess file : Options +FollowSymLinks RewriteEngine on # Send request via index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] I have removed the index.php from the config.php file

Codeigniter seems to break $_POST of '£' character (Pound)

让人想犯罪 __ 提交于 2019-12-28 18:14:25
问题 When I echo $_POST of the '£' character without CI in a simple Form, the result is as expected, a '£'. When I try the same using the CI framework using the Input class as well as the native $_POST var, echo is a blank. I've checked to make sure everything is utf-8 in the config but nothing? Any tips? UPDATE: This appears to only affect users using the latest version of MAMP and when using PHP 5.3.5. The current workaround is to go to the MAMP control panel and use the earlier version of PHP 5

Codeigniter - CI_Controller vs Controller

别说谁变了你拦得住时间么 提交于 2019-12-28 16:56:11
问题 I am trying to follow some tutorials regarding CodeIgniter, in particular ones about extending the controller, the tutorial I am following says that in the MY_Controller file I should put the following: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class MY_Controller extends Controller { function __construct() { parent::__construct(); } } However when I do that I get the following error: Fatal error: Class 'Controller' not found in /home/chimeri1/public_html

Formatting a PHP array for an SQL “IN” clause

落花浮王杯 提交于 2019-12-28 16:14:52
问题 I'm attempting to query a database for records where the "product_id" is included in an array of products IDs. The array is the post result of a multiple select input ( <select> ) and looks like: $clients = Array ( [0] => 80000016-1302638679 [1] => 8000003B-1329924004 ) I would like to pass that array to the "IN" clause of an SQL statement such as: $sql = "SELECT * FROM sales WHERE product_id IN (".$clients.")"; ...but this doesn't work (Error: Message: Array to string conversion ). Several

Formatting a PHP array for an SQL “IN” clause

天大地大妈咪最大 提交于 2019-12-28 16:13:17
问题 I'm attempting to query a database for records where the "product_id" is included in an array of products IDs. The array is the post result of a multiple select input ( <select> ) and looks like: $clients = Array ( [0] => 80000016-1302638679 [1] => 8000003B-1329924004 ) I would like to pass that array to the "IN" clause of an SQL statement such as: $sql = "SELECT * FROM sales WHERE product_id IN (".$clients.")"; ...but this doesn't work (Error: Message: Array to string conversion ). Several

Codeigniter's `where` and `or_where`

僤鯓⒐⒋嵵緔 提交于 2019-12-28 13:20:11
问题 I'm trying to specify a query in my model $this->db ->select('*') ->from('library') ->where('library.rating >=', $form['slider']) ->where('library.votes >=', '1000') ->where('library.language !=', 'German') ->where('library.available_until >=', date("Y-m-d H:i:s")) ->or_where('library.available_until =', "00-00-00 00:00:00") ->where('library.release_year >=', $year_start) ->where('library.release_year <=', $year_end) ->join('rating_repo', 'library.id = rating_repo.id') So, the trouble i'm

How to get all the variables available in a view in PHP?

独自空忆成欢 提交于 2019-12-28 09:16:10
问题 I need to see all the variables that are available in a view. I am a front end developer so I mostly work in the views directory. I don't always know which variables are being passed to the templates by the back end dev. Instead of asking him every time an easy solution would be some type of snippet that I can temporarily paste into the view that I'm working on so I can see all the available variables and even better if I can also see their types and values. I tried this: <pre><?php var_dump

How to get all the variables available in a view in PHP?

折月煮酒 提交于 2019-12-28 09:15:52
问题 I need to see all the variables that are available in a view. I am a front end developer so I mostly work in the views directory. I don't always know which variables are being passed to the templates by the back end dev. Instead of asking him every time an easy solution would be some type of snippet that I can temporarily paste into the view that I'm working on so I can see all the available variables and even better if I can also see their types and values. I tried this: <pre><?php var_dump