Welcome Guest, Not a member yet? Register   Sign In
FCPATH problem
#1

[eluser]umefarooq[/eluser]
Hi i moved my project form CI 1.7.1 to CI 1.7.2 and faced one problem of FCPATH

FCPATH in CI 1.7.1
Code:
define('FCPATH', __FILE__);

when i echo FCPATH it shows on my localhost path till my site folder name


FCPATH in CI 1.7.2
Code:
define('FCPATH', str_replace(SELF, '', __FILE__));

when i echo FCPATH it shows on my localhost path till my www or htdocs folder not till my site folder where as in comments it is written FCPATH - The full server path to THIS file in CI 1.7.2 its not coming to the right path. so i have replaced the CI 1.7.2 FCPath with CI 1.7.1 and its working fine.
#2

[eluser]krzycho[/eluser]
yeah, and it is not even documented or mentioned at the changelog Sad
#3

[eluser]krzycho[/eluser]
I've looked at SVN commits and found:
commit 1675: Removed the "index.php" portion from the FCPATH constant, as it was not needed. (rickellis)

Then, in the next commit, Rick updated URI class from
$fc_path = FCPATH;
to
$fc_path = FCPATH.SELF;

so it seems that in fact index.php is needed- this is the only line CI uses FCPATH afterall.

Hey, Rick! We've used this constants, why we're forced to unnecessary code rewrite?
#4

[eluser]TheresonAntaltego[/eluser]
Well, the nature of this constant does suggest it is a "path," and technically, a path does not include the filename.




Theme © iAndrew 2016 - Forum software by © MyBB