Welcome Guest, Not a member yet? Register   Sign In
Is base5.php ever called
#1

[eluser]thinkigniter[/eluser]
OK, it's late, for me anyway.

The current script I'm working on required a php5 function if php5 was available.

I'm running php 5.2.5 so I went to see how CI does it, C'se CI programmers are just so COOL.

Anyway...

The codeigniter.php has this code.

Code:
if (floor(phpversion()) < 5){
    
    //CALL PHP5 FUNCTION

}

But when I used it the php function wasn't called.
Hmmm!
So I added an equals and now it works

Code:
if (floor(phpversion()) <= 5){
    
    //CALL PHP5 FUNCTION

}

Does that mean codeigniter.php has never called base5.php?

Am I wrong?
#2

[eluser]Pascal Kriete[/eluser]
Hehe, see my response here (which, btw, I posted before you made this thread).
#3

[eluser]thinkigniter[/eluser]
Yeh!

I see what I did.

I didn't go to bed.

This is the full code from codeigniter.php

Code:
if (floor(phpversion()) < 5)
{
    load_class('Loader', FALSE);
    require(BASEPATH.'codeigniter/Base4'.EXT);
}
else
{
    require(BASEPATH.'codeigniter/Base5'.EXT);
}

IF it's LESS THAN version 5 call BASE4.php ELSE call BASE5.php

Only a FOOL could get this wrong...

a very tired... fool.

ni night everyone.
#4

[eluser]Bramme[/eluser]
I came across that part a while back when I was studying how exactly CI handles a request. I missed it back then though.

I'm really wondering if Derek Allard has anything to add, point out or whatever. Or anyone else closely related to the CI development.




Theme © iAndrew 2016 - Forum software by © MyBB