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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 17,955
» Latest member: molly
» Forum threads: 71,507
» Forum posts: 367,207

Full Statistics

Latest Threads
Setup for Apache on Ubunt...
Forum: CodeIgniter 4 Support
2 hours ago
» Replies: 2   » Views: 53
insert() return null
Forum: CodeIgniter 4 Support
3 hours ago
» Replies: 4   » Views: 53
connecting to postgresql ...
Forum: General Help
3 hours ago
» Replies: 8   » Views: 331
some kind of simple CMS
Forum: Lounge
5 hours ago
» Replies: 1   » Views: 55
Error in composer.json on...
Forum: Installation & Setup
9 hours ago
» Replies: 1   » Views: 84
Codeigniter CSV file unde...
Forum: CodeIgniter 3.x
10 hours ago
» Replies: 1   » Views: 100
Unknown column 'stud.id' ...
Forum: CodeIgniter 4 Support
Today, 02:45 AM
» Replies: 1   » Views: 65
Codeingniter 4 Installati...
Forum: CodeIgniter 4 Support
Today, 02:31 AM
» Replies: 2   » Views: 122
validation custom error n...
Forum: CodeIgniter 4 Support
Today, 01:12 AM
» Replies: 0   » Views: 36
CI4.0.3 Error CORS ON GET
Forum: Installation & Setup
Yesterday, 11:08 PM
» Replies: 1   » Views: 58

 
  Executing php from DB output
Posted by: El Forum - 09-25-2007, 03:49 PM - Forum: Archived Development & Programming - Replies (12)

[eluser]theswede[/eluser]
Hi all,

This is what I want to do:
I have a site that has "static pages" (Header/Footer the same + "static pages" from db). In the db-tables I store HTML, I also wish to store executable PHP code. Why? What I'd like to do is to be able to use the site_url() in my img-tags making the site more flexible in case it does not reside at the root level of my web-host.

How to accomplish this? Alternate solutions?


Thanks in advance Smile


  image library again
Posted by: El Forum - 09-25-2007, 03:27 PM - Forum: Archived Development & Programming - Replies (8)

[eluser]artificialkid[/eluser]
Hy guys
I´m trying to use the image library at the most basic example I can find in the user guide, I have GD installed,and I already checked the forum, but nothing helps and my GD version is 2.1210, my code is

Code:
<?php
class Shop extends Controller {
    
    

    function Shop()
    {
        parent::Controller();
        //$this->load->library('image_lib');    
    }
    
    function index()
    {
        $this->load->library('image_lib');
        $config['image_library'] = 'gd';
        $config['source_image'] ="./images/gallery/IMG_3668.jpg";
        $config['dest_image'] = './images/gallery/';
        //$config['create_thumb'] = 'TRUE';
        $config['width'] = '75';
        $config['height'] = '50';
    
        //$this->image_lib->initialize($config);
        //$this ->image_lib ->initialize($img_config);
    
            $this->image_lib->resize();
        if(!$this->image_lib->resize()){
            echo $this->image_lib->display_errors();
            
        }else{
            //echo('sucess');
        }
        
        //echo base_url();
        //$this->load->view('shop_view', $config);
    }
    

}
?>


my error
Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Image_lib::$dest_image

Filename: libraries/Image_lib.php

Line Number: 476
A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Image_lib::$dest_image

Filename: libraries/Image_lib.php

Line Number: 476

Your server does not support the GD function required to process this type of image.

Your server does not support the GD function required to process this type of image.

What i´m doing wrong?

if I try this code, no errors but no image in display

Code:
$config['image_library'] = 'gd';
        $config['source_image'] ="./images/gallery/IMG_3668.jpg";
        $config['dest_image'] = './images/gallery/';

        $config['width'] = '75';
        $config['height'] = '50';
    
        $this->load->library('image_lib');
        $this->image_lib->initialize($config);
        $this->image_lib->resize();


  insert in to TIMESTAMP field using ActiveRecords
Posted by: El Forum - 09-25-2007, 01:59 PM - Forum: Archived Development & Programming - Replies (5)

[eluser]ningoo[/eluser]
I am trying to insert record in to profile table (see below) which has a column called 'lastlogin'.

The problem : CI inserts '0000-00-00 00:00:00' when i try to insert new record using active records.

my apologies , if i'm missing something thats obvious.

btw , thanks in advance

here's code

Code:
$profile_data = array(
              'member_id' => $member_id ,
              'membername' => $membername ,
              'profiledescription' => '' ,
              'lastlogin' => now(),
              'status' => 1,
                );
        
        $MAINDB->insert('profiles', $profile_data);

and heres table schema
Code:
create table `profiles` (
    `id` double ,
    `member_id` double ,
    `membername` varchar (96),
    `profiledescription` blob ,
    `created` timestamp ,
    `lastlogin` timestamp ,
    `status` double
);


  Routes config from within a library
Posted by: El Forum - 09-25-2007, 01:45 PM - Forum: Archived Development & Programming - Replies (6)

[eluser]easymind[/eluser]
Is it possible to config routing from within a home made library? For example {site}/login and {site}/logout. I don't want to make separate controllers for these urls because I want a 1 file lib for easy distribution.


  Error with Video Tutorial - Blog
Posted by: El Forum - 09-25-2007, 01:15 PM - Forum: Archived General Discussion - Replies (5)

[eluser]rufus99[/eluser]
I have this controller code:

Code:
<?php

class Blog extends Controller
{

    function Blog()
    {
        parent::Controller();
    
    }
    
    
    function index()
    {
        print_r($this);
        $data['query']  = $this->db->get('entries');
        
        $this->load->view('blog_view', $data);
    
    }
}

?>

and I get this error:
---------------------

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Blog::$db

Filename: controllers/blog.php

Line Number: 16

Fatal error: Call to a member function get() on a non-object in C:\Inetpub\wwwroot\ignite\system\application\controllers\blog.php on line 16


Not too sure what I am doing wrong. Could I get some help?
Thanks.


  Video Tutorials don't play
Posted by: El Forum - 09-25-2007, 12:56 PM - Forum: Archived General Discussion - Replies (2)

[eluser]CreedFeed[/eluser]
I'm on Windows XP using both IE7 and Firefox 2... I've downloaded and installed the latest version of the Quicktime player. When i load one of the tutorials I first get an alert box that says something about an error occured with the Quicktime plugin, and then my browser crashes. I even downloaded the blog.mov file to my computer. When I open it up in Quicktime it plays an intro for about 10 seconds and then just stops playing.


  CI and PHP6 - Problems?
Posted by: El Forum - 09-25-2007, 12:18 PM - Forum: Archived General Discussion - Replies (12)

[eluser]CreedFeed[/eluser]
Correct me if I'm wrong but I believe one of the things being removed from the proposed or current development of PHP6 is going to be the assignment by reference...

$CI =& get_instance();

If that is true, then when PHP6 is released, CI would not work right?

I'm currently looking into a framework to use for some applications I'm going to be writing and the only thing holding me back from CI right now is this issue. Can anyone shed some light on this issue?

I've read other threads which explicitly said CI would not be updated to PHP5 so I'm wondering if CI will ever be updated to work with other future versions of PHP?


  Validation, re-populating array checkbox
Posted by: El Forum - 09-25-2007, 11:02 AM - Forum: Archived Development & Programming - Replies (7)

[eluser]Kopel[/eluser]
Hi,

I need to re-populate my checkbox when my form has been submitted with errors.
Everything is fine with regular checkbox, but my checkbox has to be an array (name="mycheck[]").

See below my simplified code as an example.

- In order to have an error i leave the input blank
- I check some boxes
- I submit the form
- The error on the input is found, the controller reload the form view
- The checkboxes are unchecked...

I tried all day long to find the solution of this apparently simple problem, but i'm still unsuccessful.
Please, let me know what is wrong with my code.
Thanks.

View file:

Code:
<?php echo form_open('sandbox'); ?>

&lt;input type="text" name="username" value="&lt;?php echo $this-&gt;validation->username; ?&gt;" size="50" /><br />
&lt;?php echo $this->validation->error_string; ?&gt;

&lt;input type="checkbox" name="mycheck[]" value="1" &lt;?php echo $this-&gt;validation->set_checkbox('mycheck', '1'); ?&gt; /><br />
&lt;input type="checkbox" name="mycheck[]" value="2" &lt;?php echo $this-&gt;validation->set_checkbox('mycheck', '2'); ?&gt; /><br />
&lt;input type="checkbox" name="mycheck[]" value="3" &lt;?php echo $this-&gt;validation->set_checkbox('mycheck', '3'); ?&gt; /><br />

&lt;input type="submit" value="Submit" /&gt;

&lt;/form&gt;

Controller file
Code:
&lt;?php

class Sandbox extends Controller {

    function index()
    {
        $this->load->helper(array('form', 'url'));
        
        $this->load->library('validation');
            
        $rules['username'] = "required";
        $rules['mycheck']  = "";
    
        $this->validation->set_rules($rules);
            
      
        $fields['username'] = "user name";
        $fields['mycheck']  = "my check";
    
        $this->validation->set_fields($fields);
            
      
        if ($this->validation->run() == FALSE)
        {
            $this->load->view('sandbox');
        }
        else
        {
          echo "success";
          print_r($_POST['mycheck']);
        }
    }
}
?&gt;


  xss_clean and GET
Posted by: El Forum - 09-25-2007, 10:30 AM - Forum: Archived Development & Programming - Replies (1)

[eluser]charlieD[/eluser]
Does anyone know what does the xss_clean (whether invoked automatically or directly) actually do? I.e. what kinds of tests does it run?

Also, for the site I'm developing at the moment I've had to enable GET params. Does CodeIgniter automatically run xss_clean on these or should I make that implicit? I know it does some checking for invalid characters on the query string, but is this the full xss_clean check?


  codeigniter welcome screen
Posted by: El Forum - 09-25-2007, 09:50 AM - Forum: Archived General Discussion - Replies (4)

[eluser]conspirisi[/eluser]
hi,

i've just installed codeigniter, and am very excited by it too. But I'm not sure if the welcome screen is looking like it should? Does it have any graphics on it or is it just plain text saying the following?

Welcome to CodeIgniter!

The page you are looking at is being generated dynamically by CodeIgniter.

If you would like to edit this page you'll find it located at:
system/application/views/welcome_message.php

The corresponding controller for this page is found at:
system/application/controllers/welcome.php

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.


Page rendered in 0.4367 seconds



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.