codeigniter

Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process

泄露秘密 提交于 2020-01-14 22:45:39
问题 An uncaught Exception was encountered Type: Exception Message: Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process. Filename: prm\system\libraries\Session\drivers\Session_files_driver.php Line Number: 125 Backtrace: File: \prm\application\controllers\login.php Line: 8 Function: __construct File: \prm\index.php Line: 279 Function: require_once Not able to fix this issue. please suggest how to fix this 回答1: We are setting up 'C:\Windows\Temp' windows directory

Codeigniter: download file and redirect

江枫思渺然 提交于 2020-01-14 19:18:08
问题 I have a form on this page http://www.obsia.com/products/thassos_wonder_brochure/ On hitting submit, I want it start downloading the file and also get redirected to thank you page. But I can only get it either download the file or redirect or load the thank for downloading page. This is the function for checking the form and submiting: function thassos_wonder_brochure() { $this->load->helper('form'); $this->load->helper('email'); $this->load->library('email'); $this->load->library('form

jquery and codeigniter

痴心易碎 提交于 2020-01-14 13:56:47
问题 and sorry if that question is stupid I'm trying to use javascript with codeigniter and I can't get it right what I'm actually doing is placing jQuery inside the views folder and call it from one of my view files like that: <script type="text/javascript" src="jquery.js"></script> I get no response no errors it just doesn't work, I could also display more code but my first assumption is that there something wrong with the way I call it... maybe something with the paths? any workarounds? thanks

Codeigniter - AngularJS routing causes 404

ぐ巨炮叔叔 提交于 2020-01-14 10:42:57
问题 I try to use Codeigniter with AngularJS routing, and it's working, but I need without hash. I use this code: .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider. when('/', { templateUrl: 'assets/js/partials/blank.html' }). when('/:name', { templateUrl: 'assets/js/partials/blank.html', controller: PagesController }). otherwise({redirectTo: '/'}); }]); but when I refresh the page, jumps to 404. 回答1: You

Why doesn't Codeception's PhpBrowser follow a “Reload” header?

ぃ、小莉子 提交于 2020-01-14 10:08:44
问题 This is happening to me in a real CodeIgniter project in the Ion Auth authentication library, but for the sake of clarity, I have reduced it to it's simplest form. The script: I have this one line script located at http://localhost/~captbaritone/redirect/index.php : <?php header("Refresh:0;url=https://google.com");¬ In my browser, it redirects to Google.com. The Test: To test it I wrote this acceptance test: <?php $I = new WebGuy($scenario); $I->wantTo('Redirect to Google.com'); $I->amOnPage(

Why doesn't Codeception's PhpBrowser follow a “Reload” header?

最后都变了- 提交于 2020-01-14 10:06:45
问题 This is happening to me in a real CodeIgniter project in the Ion Auth authentication library, but for the sake of clarity, I have reduced it to it's simplest form. The script: I have this one line script located at http://localhost/~captbaritone/redirect/index.php : <?php header("Refresh:0;url=https://google.com");¬ In my browser, it redirects to Google.com. The Test: To test it I wrote this acceptance test: <?php $I = new WebGuy($scenario); $I->wantTo('Redirect to Google.com'); $I->amOnPage(

CodeIgniter: pagination doesn't have question mark?

空扰寡人 提交于 2020-01-14 09:36:07
问题 The code below generates pagination using query strings. However, there is no leading ? . So, I get something like this: http://localhost/index.php/search/&limit=10 . Any ideas why? this->load->library('pagination'); $config = array(); $config['base_url'] = 'http://localhost/index.php/search/'; $config['total_rows'] = 200; $config['per_page'] = 10; $config['num_links'] = 4; $config['full_tag_open'] = '<ol>'; $config['full_tag_close'] = '</ol>'; $config['first_link'] = 'First'; $config['first

Login code sample which has been hacked via SQL Injection, although mysql_real_escape_string…

匆匆过客 提交于 2020-01-14 08:55:10
问题 I use CodeIgniter, and having trouble with hacking. Is it possible to make SQL Injection to the login code below: function process_login() { $username = mysql_real_escape_string($this->input->post('username')); $password = mysql_real_escape_string(MD5($this->input->post('password'))); //Check user table $query = $this->db->getwhere('users', array('username'=>$username, 'password'=>$password)); if ($query->num_rows() > 0) { // success login data Am I using the mysql_real_escape_string wrong,

Class 'GuzzleHttp\Client' not found

孤街醉人 提交于 2020-01-14 07:59:06
问题 I am using BOTH Guzzle and Codeigniter 3.0 for the first time. Also I admit I am using php namespace for the first time. I am trying to make a very simple get request using Guzzle according to the examples provided in the docs. (The Guzzle docs say nothing about codeigniter). The Guzzle files are located at application/class/guzzle Here is my very simple controller public function indey () { $data = array(); $data['main_content'] = "hiview"; $data['title'] = "Data Analyzer - Welcome"; $data[

Using Jquery in Codeigniter app to update div every 10 seconds

半腔热情 提交于 2020-01-14 06:35:32
问题 I'm fooling around with a codeigniter 2.X app and I'm trying to use the following Jquery code to update a number every 10 seconds in my view. <script type="text/javascript"> var auto_refresh = setInterval( function () { $('#load_score').load('<?php echo $FighterOneScore; ?>').fadeIn("slow"); }, 10000); // refresh every 10000 milliseconds </script> And this is my div tag in my view <div id="load_score"> </div> UPDATE Here is my controller code public function left() { $this->load->model(