Giter Site home page Giter Site logo

Comments (8)

hilyjiang avatar hilyjiang commented on June 28, 2024

Just comment them and it is ok now 👍

from codeigniter-subqueries.

NTICompass avatar NTICompass commented on June 28, 2024

I guess I should've tested that a bit more, sorry about that. I didn't realize the 1.7.x series didn't have set_dbprefix.

from codeigniter-subqueries.

NTICompass avatar NTICompass commented on June 28, 2024

It doesn't seem like there's a way to set the prefix in 1.7.x. You can get the prefix, though. The dbprefix() function still works. Odd.

Guess I'll just add a check to see if that method exists before trying to use it.

from codeigniter-subqueries.

NTICompass avatar NTICompass commented on June 28, 2024

v2.4.1 checks for this function before trying to call it :-)

from codeigniter-subqueries.

hilyjiang avatar hilyjiang commented on June 28, 2024

Yes, it works now 👍

BTW, I think it is not a good practice to add ?> at the end of file.
It might cause BOM problem in some charset environment.

from codeigniter-subqueries.

NTICompass avatar NTICompass commented on June 28, 2024

I've seen that most of CI's files don't have the ?> at the end. I just always learned to add it. Not really sure what the "conventions" is.

EDIT: It seems CodeIgniter says you should omit the ?>.
http://ellislab.com/codeigniter/user-guide/general/styleguide.html

I'll do that later, I got other work to do :-P

from codeigniter-subqueries.

hilyjiang avatar hilyjiang commented on June 28, 2024

For example:

a.php

<?php
    require_once('b.php');
    header('Content-Type: text/html; charset=utf-8');
?>

b.php

<?php
// nothing to do
?>


There are two blank line at the end of b.php.

Now visit a.php, the warning would come out:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/b.php:5) in /var/www/a.php on line 3

Omit the close tag can solve this.

Note that if you enable output_buffering in php.ini, this problem would not appear.

from codeigniter-subqueries.

NTICompass avatar NTICompass commented on June 28, 2024

I've never actually had that problem, but it seems like something that could happen. Thanks for pointing that out. 😄

from codeigniter-subqueries.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.