Welcome Guest, Not a member yet? Register   Sign In
  Please help me understand $this->site_sentry->login_routine()
Posted by: El Forum - 06-27-2008, 10:05 PM - Replies (6)

[eluser]Tony W[/eluser]
I saw below script in the login file of Bamboo Invoice

Quote:if (isset($username) && $username != '') { // if they tried to login
$user_id = $this->site_sentry->login_routine();
}

But I don't understand what $this->site_sentry->login_routine() means. Can someone explain it a little bit?

Thanks!


  CI not displaying error messages
Posted by: El Forum - 06-27-2008, 09:41 PM - Replies (4)

[eluser]Computerzworld[/eluser]
Hello, I am having the problem with one controller and CI doesn't gives error messages when any error occured. The page even goes blank when the same function is written twice by mistake rather than displaying can not re-declare the same function. Is there any way to display errors by means of setting something in configuration files or any other ways? please help me. Thank you.


  Issue with \r\n and \t
Posted by: El Forum - 06-27-2008, 07:20 PM - Replies (5)

[eluser]EEssam[/eluser]
Hi guys,

Can the following be written more nicely:

.....

if ($this->input->post('newline') == '\r\n')
{
$newline = "\r\n";
}
elseif ($this->input->post('newline') == '\t')
{
$newline = "\t";
}
else
{
$newline = $this->input->post('newline');
}

.....
echo $this->dbutil->csv_from_result($query, $delimiter, $newline);

Thanks.


  Not able to force download when using application libraries
Posted by: El Forum - 06-27-2008, 06:52 PM - Replies (5)

[eluser]Kon Wilms[/eluser]
If I attempt to use the download helper after loading a user library, the contents are echo'd to the display:

Code:
$this->load->library('somelib');
$this->load->helper('download');
force_download($name, $compressed);

If the library is not loaded, everything works fine and the download is forced:

Code:
$this->load->helper('download');
force_download($name, $compressed);

Even doing a manual download with headers such as the following, gives the same error (content echo'd to browser) if a user library has been loaded:

Code:
$compressed=gzencode($content, 6);
set_time_limit(0);
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Pragma: no-cache');
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . strlen( $compressed ));
header('Content-Disposition: attachment; filename=file.gz');
echo $compressed;

I've tried this with a dummy user library that has one function and no code, so definitely the functions internal to the library I am using are not the issue here.

What am I missing? Wink


  Unescaping results Active Record
Posted by: El Forum - 06-27-2008, 06:51 PM - Replies (1)

[eluser]spherop[/eluser]
I am sure the is patently obvious/basic. I am using AR and just basic db->insert and db->get.

My insert is automatically escaping, \' which seems cool ...so when using the get - since it's not unescaping the results, should it be?...or is there a recommended way of unescaping... ?


  Unescaping results Active Record
Posted by: El Forum - 06-27-2008, 06:19 PM - Replies (1)

[eluser]spherop[/eluser]
I am sure the is patently obvious/basic. I am using AR and just basic db->insert and db->get.

My insert is automatically escaping, \' which seems cool ...so when using the get - since it's not unescaping the results, should it be?...or is there a recommended way of unescaping... ?


  Can you load models within models?
Posted by: El Forum - 06-27-2008, 04:39 PM - Replies (2)

[eluser]jleequeen[/eluser]
I'm getting the following error:

Quote:Fatal error: Call to a member function total_purchases_amount() on a non-object in C:\Apache2.2\htdocs\Local_Water_Supply_Plan\application\models\calculations_model.php on line 311

Here is the code the error references from my calculations_model.

Code:
function total_available_supply($pwsid, $year) {
        $this->load->model('purchases_model');
        $this->load->model('ground_model');
        $this->load->model('surface_model');
        
        $purchases = $this->purchases_model->total_purchases_amount($pwsid, $year);
        $surface = $this->surface_model->total_surface_amount($pwsid, $year);
        $ground = $this->ground_model->total_ground_amount($pwsid, $year);
        
        return $purchases + $surface + $ground;
    }

As you can see I'm trying to load some other models within my calculation model. Can you do this? Is that why it is throwing the error? Any help would be awesome.


  What is faster?
Posted by: El Forum - 06-27-2008, 02:52 PM - Replies (3)

[eluser]SeanJA[/eluser]
I have always been curious, which way is faster?

Code:
<td> &lt;input size='25' name='department' value='&lt;?php echo $user-&gt;department ?&gt;'  /> </td>

or

Code:
&lt;?php echo "<td> &lt;input size='25' name='department' value='",$user-&gt;department,"  /> </td>"; ?&gt;

I generally use the first way, but working in a group there is a lot of code that ends up looking like the second one...


  Problems installing
Posted by: El Forum - 06-27-2008, 02:23 PM - Replies (4)

[eluser]TerabyteUK[/eluser]
Hey I'm on lunar pages who use (I think) Linux servers with Apache/1.3.39

I'm currently having problems getting my CI site set up,

http://solong.co.uk/

500 Internal Server Error.

note the site overall is ok since http://solong.co.uk/license.txt works ok

Here is my .htaccess file at the moment:
http://paste.mycodenow.com/view/ffbc1036

Here is a .htaccess I have tried on this site which doesn't work, but did work on another completely different server (which also ran Linux).
http://paste.mycodenow.com/view/d326b201

my system folder is called framework

If anybody can help me that would be great since I've been scratching my head for a couple of days


  How can I list my database tables?
Posted by: El Forum - 06-27-2008, 02:18 PM - Replies (2)

[eluser]EEssam[/eluser]
Hello,

I'm wondering how it's possible to list my database table?

I can't find that here:

http://ellislab.com/codeigniter/user-gui...ities.html

Thanks.


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

Username
  

Password
  





Latest Threads
Is it possible to go back...
by ejimenezo
43 minutes ago
Error / Shield 1.0.3 + Ci...
by kcs
4 hours ago
SQL server connection not...
by davis.lasis
5 hours ago
Validation | trim causes ...
by Gary
7 hours ago
Problem with session hand...
by Julesb
8 hours ago
External script access to...
by PomaryLinea
8 hours ago
VIRUS reported after Chro...
by InsiteFX
Yesterday, 11:34 PM
Codeigniter4 version 4.5....
by kenjis
Yesterday, 04:10 PM
Cannot access protected p...
by xsPurX
Yesterday, 02:10 PM
Update to v4.5.1, same us...
by xsPurX
Yesterday, 08:31 AM

Forum Statistics
» Members: 85,491
» Latest member: gopariwisata
» Forum threads: 77,583
» Forum posts: 376,018

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB