Welcome Guest, Not a member yet? Register   Sign In
Changing extension from .php
#4

(08-03-2015, 03:36 AM)Diederik Wrote: There used to be a variable defined in the index.php of CI that stored the extention to be used.

In CI 2.x it was already deprecated:

Code:
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');

And it has been removed completely in 3.0. I've checked a few core files and they all have hardcoded '.php' references. Not quite shure why CI made the switch from dynamic to a static situation.

But I neither can imagine why one would want or need to change the file extention of a .php file. The only reason I can think of is using file extentions to force using another php version handler, like using php 6 for .php6 files, php5 for .php5 files etc.
If needed you could change the php handlers for a specific directory/vhost in the apache config itself. This way you can use whatever handler you want without changing any files.
Yeah, I noticed that, was wondering if there was a way to accomplish it.
And its a constant, not a variable ;-)

(08-03-2015, 04:21 AM)Narf Wrote:
(08-03-2015, 03:36 AM)Diederik Wrote: And it has been removed completely in 3.0. I've checked a few core files and they all have hardcoded '.php' references. Not quite shure why CI made the switch from dynamic to a static situation.

Because changing the filename extension to something else than .php is even more terrible than manually modifying the framework.

Why is it more terrible?
Reply


Messages In This Thread
Changing extension from .php - by jLinux - 08-02-2015, 07:00 PM
RE: Changing extension from .php - by Diederik - 08-03-2015, 03:36 AM
RE: Changing extension from .php - by Narf - 08-03-2015, 04:21 AM
RE: Changing extension from .php - by jLinux - 08-03-2015, 01:40 PM
RE: Changing extension from .php - by Narf - 08-04-2015, 03:43 AM
RE: Changing extension from .php - by msteudel - 08-03-2015, 11:08 PM
RE: Changing extension from .php - by InsiteFX - 08-04-2015, 03:57 AM
RE: Changing extension from .php - by mwhitney - 08-04-2015, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB