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



Search Forums

(Advanced Search)

Forum Statistics
» Members: 23,968
» Latest member: Anderson1987Ad
» Forum threads: 73,323
» Forum posts: 375,130

Full Statistics

Latest Threads
CI4 Generate Empty String...
Forum: CodeIgniter 4 Support
3 hours ago
» Replies: 10   » Views: 633
Which browser do you guys...
Forum: Lounge
3 hours ago
» Replies: 79   » Views: 54,874
Query Builder need help
Forum: CodeIgniter 4 Discussion
3 hours ago
» Replies: 4   » Views: 98
[SOLVED] $_POST is gettin...
Forum: General Help
5 hours ago
» Replies: 6   » Views: 8,572
Freelancer Needed.
Forum: Jobs
7 hours ago
» Replies: 10   » Views: 2,164
I am currently using Code...
Forum: General Help
8 hours ago
» Replies: 0   » Views: 16
One .env File for Develop...
Forum: CodeIgniter 4 Support
10 hours ago
» Replies: 0   » Views: 8
website is getting blank ...
Forum: CodeIgniter 4 Support
Yesterday, 04:08 PM
» Replies: 4   » Views: 117
.htaccess on an https ser...
Forum: General Help
Yesterday, 02:59 PM
» Replies: 1   » Views: 70
CodeIgniter 3 - 403 Forbi...
Forum: General Help
Yesterday, 02:53 PM
» Replies: 0   » Views: 42

  permitted_uri_chars single quote
Posted by: El Forum - 06-22-2007, 03:34 AM - Forum: Archived Development & Programming - Replies (3)

I need to add single quote in permitted_uri_chars in config.php. How do I do that? I tried several things (' \' and others), but it did not work.

I get the following error:
Severity: Warning

Message: preg_match() [function.preg-match]: Compilation failed: range out of order in character class at offset 17

Filename: libraries/Router.php

Line Number: 408

I am using ajax to pass on the string to the controller.


  database problem. Help me!
Posted by: El Forum - 06-22-2007, 03:11 AM - Forum: Archived Development & Programming - Replies (4)

I want to get value of 1 table via id of 2 table. I have tried to use join() query command to solve but it not effective and display this error:

Quote:An Error Was Encountered
Unable to load the requested language file: language/db_lang.php
This is my code:
        //$this->db->select('Ten');// field name of another table
        $this->db->join('thanhpho','ThanhPhoID = ThanhPhoID');// join 2 table
        $this->db->orderby('HoahauID desc');
How can i get the value of a table which have related with another table? Tell me please..

  Please help me this code :()
Posted by: El Forum - 06-22-2007, 02:42 AM - Forum: Archived Development & Programming - Replies (6)

I have built a controller that it included one function doUpload, like this:

class Dangky extends Controller {
    function Dangky()
        $this->load->model('tintuc_model', 'tintuc');
        $this->load->model('dangky_model', 'dangky');
    function index()
                $this->load->view('upload_form', array('error' => ' ' ));
                // and something...
        function doUpload()
            $config['upload_path'] = '/uploads/';
            $config['allowed_types'] = 'gif|jpg|png';
            $config['max_size']    = '100';
            $config['max_width']  = '1024';
            $config['max_height']  = '768';
            $this->load->library('upload', $config);
            if ( ! $this->upload->do_upload())
                $error = array('error' => $this->upload->display_errors());
                $data['content'] = $this->load->view('dangky', $error, true);
            $contain_array = array('upload_data' => $this->upload->data());
                $this->db->set('file_name', $upload_data['file_name']);
                $this->load->view('dangky', array('error' => ' ' ));    
and this is my form :
            <?=form_open_multipart('dangki/doUpload'); ?>
          <table cellspacing="0" cellpadding="5" width="100%" border="0">
              <col width="30%" />
              <col width="70%" />
                  <td align="right">(<strong>*</strong>) Ảnh chân dung: </td>
  <td align="left">&lt;input id="fileUpPoitrait" type="file" name="fileUpPoitrait" /&gt;</td>
                  <td align="right">(<strong>*</strong>) Ảnh toàn thân: </td>
  <td align="left">&lt;input id="fileUpFullPicture" type="file" name="fileUpFullPicture" /&gt;</td>
                  <td align="right"> Xác nhận của nhà   trường: </td>
  <td align="left">&lt;input id="fileUpCertificate" type="file" name="fileUpCertificate" /&gt;
My form have 3 field wait to upload. i tried to solve my controller to save filename into database and store the image into some folder so that i can load it out to my page later. I dont know how to solve the path of the file name(it's save a full path of the image when upload). Please tell me how to perform it. I have read in user guide of CI but it's too simple and cannot resolve my problems.

  URI Segment.
Posted by: El Forum - 06-22-2007, 02:29 AM - Forum: Archived Development & Programming - Replies (9)

Was wondering how do I find out what the current URI segment 3 is equal to...?

Basically I have a header that gets pulled into different pages, and usuing that header I want to know what the current page is so I can place a bit of code into the header that will relate to the page,
FYI, using variables will not work, I have multiple places to place the code, each being different for the different pages.

  Integrate Facebook Php Client
Posted by: El Forum - 06-21-2007, 11:56 PM - Forum: Archived Development & Programming - Replies (30)

Trying to integrate Facebook Php Client to Igniter. Any suggestions on how to do that? Copying their files to system/libraries does seems to work for me.



Posted by: El Forum - 06-21-2007, 07:05 PM - Forum: Archived General Discussion - Replies (4)


I have a application with a menubar anda a secundary left menu that is called by a simple innerHTML javascript.
the code is

the extract of view file:

<div id="menu">
<ul id="menubarra">
<li>&lt;a onclick="montamenu('ensino')"&gt;ensino</a></li>
<li>&lt;a onclick="montamenu('pesquisa')"&gt;pesquisa</a></li>
<li>&lt;a onclick="montamenu('extensao')"&gt;extens&atilde;o</a></li>
<div id="menuesquerda"> // the div to put the secundary menu.

the javascript code:

function montamenu(menu) {
if (menu=='ensino') {
var leftmenu = "<ul><li><a href="+base_url+"ensino/habilitacoes>habilita&ccedil;&otilde;es</a></li>"+
"<li><a href="+base_url+"ensino/disciplinas>disciplinas</a></li>"+
"<li><a href="+base_url+"ensino/docentes>docentes</a></li>"+
"<li><a href="+base_url+"ensino/vestibular>Informa&ccedil;&otilde;es ao vestibulando</a></li></ul>"
} else if (menu=='pesquisa')
var leftmenu = "<ul><li><a href="+base_url+"pesquisa/projetos>Projetos em Andamento</a></li>"+
"<li><a href="+base_url+"pesquisa/publicacoes'>Publica&ccedil;&otilde;es</a></li>"+
"<li><a href="+base_url+"pesquisa/tcc>TCC&acute;S dos Alunos</a></li></ul>"
else {
var leftmenu = "<ul><li><a href="+base_url+"extensao/projetos>Projetos em Andamento</a></li>"

the question is:

In the firefox browser everething is ok but they don´t work in IE.

Someone could help?

  Controllers in Two-Level Sub Directory Fail!
Posted by: El Forum - 06-21-2007, 05:50 PM - Forum: Archived Development & Programming - Replies (2)

[eluser]Phil Sturgeon[/eluser]
I have most of my controllers in /controllers/admincp/ as this is the biggest part of my system. However with the increase in files, i tried making another subdirectory /controllers/admincp/settings/ and no joy.

Tried making /admincp/test/stuff with in index() that runs echo "poo"; but nothing there either, I just get 404 every time.

I assume this is not personal error, is this a bug others have ever run into?

  Is CI able to handle a multi-user blog?
Posted by: El Forum - 06-21-2007, 12:34 PM - Forum: Archived Development & Programming - Replies (8)

I've looked at the authentication_lite plugin. It seems to do a good job at managing user levels but not individual users. If I wanted to create a site that allowed multiple users to submit blog entries, is CI capable of restricting users to editing/deleting only the entries they've created?

I've been using WordPress (built on PHP) for some time now but have found that I will need to seriously alter it for a future project. I was hoping that I could use something like CI to build from scratch rather than modifying WP. What do you think?

  model not loading :(
Posted by: El Forum - 06-21-2007, 12:23 PM - Forum: Archived Development & Programming - Replies (2)

Hi everyone.

I'm having a problem getting a model to load. I'm getting this error:

A PHP Error was encountered
Severity: Notice
Message: Undefined property: User::$load
Filename: controllers/user.php
Line Number: 6

Fatal error: Call to a member function model() on a non-object in C:\dev\xampplite\htdocs\ci\system\application\controllers\user.php on line 6

And here is my Controller
class User extends Controller {
    function user()
Any idea's on why I might be getting this error?

Any idea

  Integrating R&OS PDF generator in CI
Posted by: El Forum - 06-21-2007, 09:16 AM - Forum: Archived Development & Programming - Replies (3)

Hi. After a long search I decided to pick R&OS PDF generation classes and try to integrate it into CI.
I know, it's sooo far from being perfect, but being stuck to PHP4 I couldn't find anything better...

Unfortunately, I'm still a first-timer OO coder and I don't find it easy to understand the necessary steps to integrate such classes and make a CI library or what else out of it.

Does anybody want to help me and release a solution (hopefully useful to the community...)?

Well, that's what I did.
Downloaded the classes athttp://www.ros.co.nz.pdf, unzippd and I got:
- class.pdf.php
- class.ezpdf.php
- fonts folder
- readme.php (which actually calls the classes to produce the pdf file)
- data.txt (a text file with the content to be pdf'd)

I followed Danfreak advice and created a folder "my_classes" into the Application folder.
Then I put into "my_classes" the 'class' files and the fonts folder.

I added the 'ini_set' thing into the index.php file to make CI load the folder 'my_classes' (see this link).

Am I doing right till now? Well, now I took a controller 'page' and
added a function 'createpdf'.

function createpdf()
    $pdf =& new Cezpdf();
    $pdf->ezText('Hello World!',50);

The $pdf lines are taken from a doc example.
I get as output a text page which notifies an undefined index error.
in the class.pdf.php file, on line 1934.

Anybody willing to help me?

I'd really appreciate any help. Thanks a lot.

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