Welcome Guest, Not a member yet? Register   Sign In
  Queuing system?
Posted by: El Forum - 02-08-2008, 10:14 AM - No Replies

[eluser]dmorin[/eluser]
Does anyone know of an easy to use and reliable Queuing system that works well with CI? I'm looking for something so that I can offload potentially time consuming, task such as sending emails, to a different server.

If anyone has any ideas, please let me know. Thanks.


  Call to undefined function form_input in CI 1.6
Posted by: El Forum - 02-08-2008, 09:58 AM - Replies (4)

[eluser]snurb[/eluser]
I followed a godbit tutorial (registration form) using ci 1.6 and it produces a fatal error. it says i'm calling an undefined function form_input. i tried the tutorial using 1.5.4 and there was no error.


  How can I strip down CI?
Posted by: El Forum - 02-08-2008, 09:43 AM - Replies (19)

[eluser]devtrench[/eluser]
I'm writing a mini application that I would like to distribute, but I don't think my app uses a lot of what codeigniter has by default.

Can anyone give me a suggestion as to what I can safely take out of the default install? I assume that if I'm not using certain helpers and classes that those could be removed to reduce the filesize of the entire app, but I don't really know what the dependencies are.

Thanks for your help!

James


  Two Databases
Posted by: El Forum - 02-08-2008, 09:29 AM - Replies (2)

[eluser]gdboling[/eluser]
I searched a bit but didn't find anything. Maybe I used the wrong search string. Anyway, I have phpbb set up and I am writing an app to sit along side the forums for a site. I want to utilize member info from the forum memberships but I don't want to store my app data in the same database.

Is there a way to manager 2 seperate db connections in code igniter?

Thanks.


  Using libraries and hooks
Posted by: El Forum - 02-08-2008, 09:00 AM - No Replies

[eluser]asprillia[/eluser]
Hi there,

My question is rather a 'is this the right coding practice' question: can I modify hooks config inside a library? My concern is that if someone sets its hooks in the config, and loads my module, it would overwrite the config.

Example: a have a library, and when it gets loaded changes the 'post_controller' hook.


  how i call the controllers?
Posted by: El Forum - 02-08-2008, 08:05 AM - Replies (1)

[eluser]Peter74[/eluser]
sorry about my newbies questions, i hope u can helpme, iam sure this is a stupid queston, but i have to ask, i spend 1 day to resolv... and not good result iam getting crazy
here is, i have this

--- controllers
----- front.php
----- inicio.php

--- views
----- front_view.php

front.php

Code:
<?php
    class Front extends Controller{
        function Front(){
            parent::Controller();
            $this->load->helper('url');
        }
        function index(){
            $url['es']=anchor('front/someone','Show me someone function');
            $url['en']=anchor(base_url().'inicio','Please load the inicio controller!');
            $this->load->view('front_view', $url);
        }
        function someone(){
            echo "iam someone";
        }
    }
?>

inicio.php

Code:
<?php
    class Inicio extends Controller{
        function Inicio(){
            parent::Controller();
        }
        function index(){
                echo "iam the inicio controller!!!";    
        }
    }
?>


front_view.php
Code:
<html>
<body>
&lt;?=$es;?&gt;<br>
&lt;?=$en;?&gt;<br>
&lt;/body&gt;
&lt;/html&gt;

when i click, the browser give me the same results for boths links
"server not found"

txs for comments, any think helpme a lot


  Performance issue of Zip Class
Posted by: El Forum - 02-08-2008, 08:05 AM - Replies (20)

[eluser]stanleyxu[/eluser]
I use the following code to compress a folder.
- When folder contains 1000 items, it takes 65secs
- When folder contains 500 items, it takes 8secs.

Code:
$this->load->library('zip'); // zip object
$this->zip->read_dir(($path_to_dir); // contains 1000+ files
$this->zip->archive($zip_filename);

I think there is a bottleneck in Zip.php.
I modified the source, after that:
- When folder contains 1000 items, it takes 2secs
- When folder contains 500 items, it takes 1secs.

This issue has been reported in bug tracker as well.
Full Source: Click Here


  What I am doing wrong?
Posted by: El Forum - 02-08-2008, 07:39 AM - Replies (3)

[eluser]Rubiz'[/eluser]
Well, I tried the upload exemple in the site I'm working now it worked perfect, I though it would be the first time I could use Upload class, but now, I'm using an upload function inside a controller and its returning me the error message "invalid path" ... I just used it as the user guide exemple and it doenst work anymore!!!

What I'm doing wrong????

Code:
if ( $_FILES['img']['name'] != '' )
            {
                $nomeImg = $this->do_upload( getcwd() . '/upload/', 'img', '118', '123' );
                echo $nomeImg;
                return;
            }

the function

Code:
function do_upload($path, $field_name, $maxWidth = '1280', $maxHeight = '1024')
    {
        $config['upload_path'] = $path;
        $config['allowed_types'] = 'jpg|gif|png|bmp|ppt|pps|pdf';
        $config['max_size']    = '10000';
        $config['max_width']  = $maxWidth;
        $config['max_height']  = $maxHeight;
        
        $this->load->library('upload', $config);
    
        if ( ! $this->upload->do_upload( $field_name ) )
        {
            $error = array('error' => $this->upload->display_errors());
            print_r( $error );
        }    
        else
        {
            $data = array('upload_data' => $this->upload->data());
            return $data['file_name'];
        }
    }


  Upload function becoming dynamic
Posted by: El Forum - 02-08-2008, 07:14 AM - No Replies

[eluser]Rubiz'[/eluser]
Hi there!

I'm trying to make my upload class something as a helper, than I can config it dynamically cause I have several forms and I have audio extensions, video extensions, ppt, pdf, and images.

I tried to take the exemple used in user guide and make a helper, but it returns me an error about $this used in wrong place.

Now, I have it:

Code:
&lt;?

class Upload extends Controller {
    
    function Upload()
    {
        parent::Controller();
    }

    function do_upload($path, $maxWidth = NULL, $maxHeight = NULL)
    {
        $config['upload_path'] = $path;
        $config['allowed_types'] = 'jpg|gif|png|bmp|ppt|pps|pdf';
        $config['max_size']    = '10000';
        $config['max_width']  = $maxWidth;
        $config['max_height']  = $maxHeight;
        
        $this->load->library('upload', $config);
    
        if ( ! $this->upload->do_upload())
        {
            $error = array('error' => $this->upload->display_errors());
            echo $error;
        }    
        else
        {
            $data = array('upload_data' => $this->upload->data());
            echo $data['file_name'];
        }
    }    
}

?&gt;

I'd like to know how I can become this dinamic... to use as a method... ?
And, when I have a pdf file or ppt file, I dont need to specify width and height, this NULL I have used is right if I have no dimensions?


  Code igniter in IIS
Posted by: El Forum - 02-08-2008, 06:03 AM - Replies (1)

[eluser]Sawariya[/eluser]
Code igniter will work in IIS ?? if it possible how to configure Configure in IIS???


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Version number stays un-u...
by trunky
1 hour ago
codeigniter4/queue Not lo...
by mywebmanavgat
5 hours ago
Array to HTML "Table"
by HarmW94
6 hours ago
shortcodes for ci4
by xsPurX
8 hours ago
TypeError when trying to ...
by b126
Today, 12:04 AM
Webhooks and WebSockets
by InsiteFX
Yesterday, 10:39 AM
Retaining search variable...
by pchriley
Yesterday, 05:46 AM
Reading a session variabl...
by xanabobana
Yesterday, 05:05 AM
Update to v4.5.1, same us...
by kenjis
04-17-2024, 07:47 PM
Codeigniter 4 extend core...
by Semsion
04-17-2024, 05:08 AM

Forum Statistics
» Members: 84,584
» Latest member: kalyt72
» Forum threads: 77,560
» Forum posts: 375,900

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB