Codeigniter path functions definitions
up vote
15
down vote
favorite
I have come across this page
https://www.codeigniter.com/user_guide/general/reserved_names.html
Could someone please explain to me what following constants do:
EXT
FCPATH
SELF
BASEPATH
APPPATH
Thanks
php codeigniter
add a comment |
up vote
15
down vote
favorite
I have come across this page
https://www.codeigniter.com/user_guide/general/reserved_names.html
Could someone please explain to me what following constants do:
EXT
FCPATH
SELF
BASEPATH
APPPATH
Thanks
php codeigniter
2
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00
add a comment |
up vote
15
down vote
favorite
up vote
15
down vote
favorite
I have come across this page
https://www.codeigniter.com/user_guide/general/reserved_names.html
Could someone please explain to me what following constants do:
EXT
FCPATH
SELF
BASEPATH
APPPATH
Thanks
php codeigniter
I have come across this page
https://www.codeigniter.com/user_guide/general/reserved_names.html
Could someone please explain to me what following constants do:
EXT
FCPATH
SELF
BASEPATH
APPPATH
Thanks
php codeigniter
php codeigniter
edited Nov 10 at 18:12
Manu K M
385311
385311
asked Dec 21 '12 at 14:39
lomse
1,25442646
1,25442646
2
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00
add a comment |
2
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00
2
2
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00
add a comment |
3 Answers
3
active
oldest
votes
up vote
33
down vote
accepted
These constants are each defined in the index.php page:
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\", "/", $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
define('APPPATH', $application_folder.'/');
else
if ( ! is_dir(BASEPATH.$application_folder.'/'))
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
define('APPPATH', BASEPATH.$application_folder.'/');
Starting at line 196 on https://github.com/EllisLab/CodeIgniter/blob/develop/index.php
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
add a comment |
up vote
14
down vote
You can find its short definition in index.php on the root of your CI folder.
EXT: The PHP file extension
FCPATH: Path to the front controller (this file) (root of CI)
SELF: The name of THIS file (index.php)
BASEPATH: Path to the system folder
APPPATH: The path to the "application" folder
add a comment |
up vote
2
down vote
SELF = index.php
Use when you want to include something from your root folder
FCPATH = C:xampphtdocsyour_root_folder
Use when you want to include something from your application folder
APPPATH = C:xampphtdocsyour_root_folderapplication
BASEPATH = C:xampphtdocsyour_root_foldersystem
Please format your answer
– Billa
Aug 19 at 18:56
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
33
down vote
accepted
These constants are each defined in the index.php page:
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\", "/", $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
define('APPPATH', $application_folder.'/');
else
if ( ! is_dir(BASEPATH.$application_folder.'/'))
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
define('APPPATH', BASEPATH.$application_folder.'/');
Starting at line 196 on https://github.com/EllisLab/CodeIgniter/blob/develop/index.php
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
add a comment |
up vote
33
down vote
accepted
These constants are each defined in the index.php page:
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\", "/", $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
define('APPPATH', $application_folder.'/');
else
if ( ! is_dir(BASEPATH.$application_folder.'/'))
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
define('APPPATH', BASEPATH.$application_folder.'/');
Starting at line 196 on https://github.com/EllisLab/CodeIgniter/blob/develop/index.php
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
add a comment |
up vote
33
down vote
accepted
up vote
33
down vote
accepted
These constants are each defined in the index.php page:
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\", "/", $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
define('APPPATH', $application_folder.'/');
else
if ( ! is_dir(BASEPATH.$application_folder.'/'))
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
define('APPPATH', BASEPATH.$application_folder.'/');
Starting at line 196 on https://github.com/EllisLab/CodeIgniter/blob/develop/index.php
These constants are each defined in the index.php page:
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
// this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\", "/", $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
define('APPPATH', $application_folder.'/');
else
if ( ! is_dir(BASEPATH.$application_folder.'/'))
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
define('APPPATH', BASEPATH.$application_folder.'/');
Starting at line 196 on https://github.com/EllisLab/CodeIgniter/blob/develop/index.php
answered Dec 21 '12 at 14:55
swatkins
11.6k43370
11.6k43370
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
add a comment |
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
Very documented. Exactly what I need thanks
– lomse
Dec 21 '12 at 15:56
add a comment |
up vote
14
down vote
You can find its short definition in index.php on the root of your CI folder.
EXT: The PHP file extension
FCPATH: Path to the front controller (this file) (root of CI)
SELF: The name of THIS file (index.php)
BASEPATH: Path to the system folder
APPPATH: The path to the "application" folder
add a comment |
up vote
14
down vote
You can find its short definition in index.php on the root of your CI folder.
EXT: The PHP file extension
FCPATH: Path to the front controller (this file) (root of CI)
SELF: The name of THIS file (index.php)
BASEPATH: Path to the system folder
APPPATH: The path to the "application" folder
add a comment |
up vote
14
down vote
up vote
14
down vote
You can find its short definition in index.php on the root of your CI folder.
EXT: The PHP file extension
FCPATH: Path to the front controller (this file) (root of CI)
SELF: The name of THIS file (index.php)
BASEPATH: Path to the system folder
APPPATH: The path to the "application" folder
You can find its short definition in index.php on the root of your CI folder.
EXT: The PHP file extension
FCPATH: Path to the front controller (this file) (root of CI)
SELF: The name of THIS file (index.php)
BASEPATH: Path to the system folder
APPPATH: The path to the "application" folder
edited Jun 25 '14 at 11:21
Community♦
11
11
answered Dec 21 '12 at 14:56
SubRed
2,75911215
2,75911215
add a comment |
add a comment |
up vote
2
down vote
SELF = index.php
Use when you want to include something from your root folder
FCPATH = C:xampphtdocsyour_root_folder
Use when you want to include something from your application folder
APPPATH = C:xampphtdocsyour_root_folderapplication
BASEPATH = C:xampphtdocsyour_root_foldersystem
Please format your answer
– Billa
Aug 19 at 18:56
add a comment |
up vote
2
down vote
SELF = index.php
Use when you want to include something from your root folder
FCPATH = C:xampphtdocsyour_root_folder
Use when you want to include something from your application folder
APPPATH = C:xampphtdocsyour_root_folderapplication
BASEPATH = C:xampphtdocsyour_root_foldersystem
Please format your answer
– Billa
Aug 19 at 18:56
add a comment |
up vote
2
down vote
up vote
2
down vote
SELF = index.php
Use when you want to include something from your root folder
FCPATH = C:xampphtdocsyour_root_folder
Use when you want to include something from your application folder
APPPATH = C:xampphtdocsyour_root_folderapplication
BASEPATH = C:xampphtdocsyour_root_foldersystem
SELF = index.php
Use when you want to include something from your root folder
FCPATH = C:xampphtdocsyour_root_folder
Use when you want to include something from your application folder
APPPATH = C:xampphtdocsyour_root_folderapplication
BASEPATH = C:xampphtdocsyour_root_foldersystem
edited Aug 19 at 19:17
answered Aug 19 at 18:37
Mohammad Khalik Shaikh
212
212
Please format your answer
– Billa
Aug 19 at 18:56
add a comment |
Please format your answer
– Billa
Aug 19 at 18:56
Please format your answer
– Billa
Aug 19 at 18:56
Please format your answer
– Billa
Aug 19 at 18:56
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f13992074%2fcodeigniter-path-functions-definitions%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Those aren't functions, they are constants.
– Rocket Hazmat
Dec 21 '12 at 15:00