0
голосов
2ответов
102 просмотров

mysql results-to-csv writing function execution doesn't finish on production

I have this function on my controller (Im using CodeIgniter) that reads the database, then produces a comma-delimited string that I feed on print() so the user can save/open the file. On development, the export of about 2000+ records takes about 20-30 seconds. The problem is, on production, the...

42
голосов
13ответов
80119 просмотров

.htaccess issues: No input file specified

Can someone help me with this? I'm feeling like I've been hitting my head against a wall for over 2 hrs now. I've got Apache 2.2.8 + PHP 5.2.6 installed on my machine and the .htaccess with the code below works fine, no errors. RewriteEngine on RewriteCond $1 !^(index\.php|css|gfx|js|swf|robots...

1
голосов
8ответов
495 просмотров

PHP Framework that does Named URLs? (other than Zend Framework)

I really like the named URLs in the Django Framework, and was wondering which of the PHP Frameworks supported such a thing. (I believe Zend Framework does, but please exclude that from your answers, without explanation). For instance, in Django I can name a path like "/items/###" as "item-detai...

76
голосов
8ответов
313271 просмотров

Sending email with gmail smtp with codeigniter email library

<?php class Email extends Controller { function Email() { parent::Controller(); $this->load->library('email'); } function index() { $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config[...

0
голосов
1ответов
1171 просмотров

codeigniter and jquery uploadify

I have using codeigniter and jquery uploadify for my image gallery. It works fine in my localhost. My problem is when I uploaded into the server. Any help would highly appreciated. Thanks in advance the error is: 'Data Loaded: <p>The path to the image is not correct.</p><p>...

4
голосов
3ответов
5782 просмотров

How to convert from native php to codeigniter

I have the following db and php. I am trying to make a unordered list of category menu. The original php is working by itself. I am trying to convert this to MVC in codeigniter and the following is what I got so far and not working. If someone can point out what I am doing wrong, I will appreciat...

0
голосов
1ответов
5147 просмотров

jquery ajax POST size limit?

I’m using jquery to send text back to my ajax.php controller like this: var dataString = "1234567890"; $.post( '../ajax/save', { data: dataString }, function(){ alert("success"); }, "text"); It works well, that is until the dataString gets to be ~3500 characte...

3
голосов
4ответов
3025 просмотров

How to access Controller class in CodeIgniter

I have written an authentication class controller containing a method to check login status of user, and redirect him to login page if he/she is not logged in. I need to call this function from other controller methods to authenticate the user. What is a good way to do that?

7
голосов
7ответов
48663 просмотров

CodeIgniter: How do I include a .js file in view?

Where and how do I include .js files in Views in CodeIgniter? I have tried this: <script type="text/javascript" src="system/application/libraries/jquery.js"></script> As I figured that the index.php is the one that is loading the views, so I'm guessing that every time a page is l...

2
голосов
3ответов
7191 просмотров

image as anchor in codeigniter

how to make an image as an anchor in codeigniter? I've tried the following code, echo anchor("admin/conf/edit/".$list['id'],img(array('src' => '../img/edit.jpg', 'alt' => ""))); It gives me a grey box like in the Actions column Thanks...

2
голосов
2ответов
2625 просмотров

How do you setup Codeigniter to handle multiple projects with shared ci base?

I've seen several CI implementation examples that claim you can put project folders under the "applications" folder for Codeigniter. However I've not been able to see this work as promised. Here is what I have done and what I would like to do - maybe you can help out. For the sake of argument m...

0
голосов
3ответов
2220 просмотров

Building a CodeIgniter GUI Installer

I'm building a self-hosted web app using CodeIgniter and I need a nice GUI-ified installer which will present the user with a form for database info, validate and test the info, write that info to the database.php config file, and then set up the DB structure. Any tips for this? Should it be ins...

0
голосов
2ответов
6331 просмотров

CodeIgniter and PostgreSQL - Retrieving data from Function returning refcursor

I have a PostgreSQL function that selects data and returns it via a refcursor, similar to the following declaration: CREATE OR REPLACE FUNCTION my_function() RETURNS refcursor AS ... How do I retrieve data from this function via a CodeIgniter model? I can't just SELECT directly from the fu...

1
голосов
3ответов
291 просмотров

Is there anything like Code Igniter's DBForge for C#?

The Database Forge Class contains functions that help you manage your database. It can: Create or drop a database Add fields and keys Create, drop and modify a table I was wondering if anything like that existed for C# or .Net. Otherwise, I think I have a little project on my hands.

-1
голосов
1ответов
293 просмотров

Ajax wih CodeIgniter

I'm trying to create 3 textfields with CI by using form_input. One is to enter the price, one is to enter the desired discount value, and the last one is for the discounted price which is calculated from price and discount value. How do I achieve it with CI? Thanks.

2
голосов
4ответов
6271 просмотров

smtp codeigniter gmail error

I am sorry I keep coming back with this issue. I checked my account and it’s fine( signed on no captcha) and still nothing. It still returns this to me: 220 mx.google.com ESMTP d13sm702743fka.52 hello: 250-mx.google.com at your service, [82.128.53.160] 250-SIZE 35651584 250-8BITMIME 250-AUTH LO...

3
голосов
1ответов
2445 просмотров

Can I Use MySQLi and PHP5 Syntax Within CodeIgniter?

Im starting a new web project, and I figured I'd try using a framework. I know CodeIgniter is coded in PHP4, but will I be able to use the MySQLi functions of MySQL, as well as PHP5 syntax (when it comes to OO especially) while coding with CodeIgniter? Should I use Kohana instead?

0
голосов
1ответов
2290 просмотров

Get Renamed File Names of JavaScript Forms in CodeIgniter

I have a multiple image upload form, and the following code is working well for uploading. I need to save file names to database to the database, but I cannot figure out how to do that properly. uploadform.php: echo form_open_multipart('gallery/upload'); <input type="file" name="photo" si...

1
голосов
1ответов
115 просмотров

How to Send to View `$data` and `$data2_cat2` at same time?

I'm using CodeIgniter, and I'm experiencing an issue on how to send to view $data and $data_cat2 at same time? $data['records'] = $this->gallery_model->get_all(1); $data_cat2['records'] = $this->gallery_model->get_all(2); $this->load->view('gallery/index.php',$data...

1
голосов
5ответов
2106 просмотров

Randomly Selecting Rows with MySQL

To randomly select records from one table; do I have to always set a temporary variable in PHP? I need some help with selecting random rows within a CodeIgniter model, and then display three different ones in a view every time my homepage is viewed. Does anyone have any thoughts on how to solve t...

0
голосов
1ответов
217 просмотров

Multi-dimentional array question: Where does ['children'] come from?

I am confused about multi-dimentional array. In the following db, php and html, I don't understand the usage of foreach ($navlist as $key => $list){ foreach ($list as $topkey => $toplist){.. and foreach ($toplist['children'] as $subkey => $subname){... And also this code is confus...

1
голосов
2ответов
1447 просмотров

Using Google Apps Email in CodeIgniter

How do I use Google Apps' email services to send mail using the CodeIgniter email class? The email class seems to prefer SMTP, and I was going through the clients Google Apps account. I can't find any place within the Google Apps settings for SMTP. Does anyone know of a solution for this issue?

3
голосов
2ответов
28220 просмотров

Creating an object from a class in Codeigniter

The following codes are from http://d.hatena.ne.jp/dix3/20081002/1222899116 and codes are working well. This is an example of using snoopy in codeigniter. Q1. Am I correct to say that I can't use, $this -> load -> library('snoopy') since Snoopy.php does not create an object. And the ex...

0
голосов
2ответов
987 просмотров

Show each date only once

All right, this must be an absolutely easy question, and I apologize for that. I also apologize if I simply failed in finding the right search terms to use to come to an answer on my own. I did try, but my lack of fluency in PHP kind of makes me suck at searching. I'm looking for a simple way t...

4
голосов
4ответов
764 просмотров

Building a real object oriented framework in PHP, suggestions wanted

I've been using the CodeIgniter framework, however after learning Java and awesome features like Interfaces, Abstract classes, packages, and that PHP 5 also supports most of these features, I'm ready to graduate and build a real OO framework in PHP which uses all of these features (including name...

26
голосов
5ответов
32955 просмотров

Getting raw SQL Queries in CodeIgniter 1.7

I'm trying to debug some code in my first serious CodeIgniter app and I can't seem to find where I can simply get the raw SQL that my ActiveRecord code just generated. $where = 'DAY(`datetime_start`) = '. date('d',$day) .' AND '; $where .= 'MONTH(`datetime_start`) = '. date('m',$day) .'...

0
голосов
2ответов
132 просмотров

Linking to Pages with Flash in CodeIgniter

I've made a website using Flash in CodeIgniter. Normally when you link to a page in CodeIgniter, you use the anchor() method, which you pass URL segments to. How am I able to set links to pages within Flash? Hopefully there's a way other than changing the links after the site is installed, and co...

0
голосов
2ответов
989 просмотров

CodeIgniter Facebook URL Errors

I'm currently having issues with my Facebook appliation being ported to CodeIgniter from raw PHP. The issue I'm having is that I have a CodeIgniter driven redirect: function signedin() { echo "signed in?"; } function save_user_data() { $insert['uid'] = $_POST['uid']; $this->db-&...

40
голосов
3ответов
63241 просмотров

What does __FILE__ mean?

I have the following code from Codeigniter index.php My understanding is that, If / of string position in $system_folder (in this case CIcore_1_7_1) is false, and if realpath function exists AND (?) is not false, $system_folder is assigned to (?) /$system_folder. else $system_folder is assigned...

-2
голосов
2ответов
9697 просмотров

How to Use Captcha Plugin in CodeIgniter

I followed this page, and the code is not working as it should in my project. I've tried to find other tutorial on how to execute what I need, however, it does not work as it should in my project either. Is anyone able to direct me to a tutorial that explains in a detailed fashion on how to use C...