We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I get the system folder name?

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Sorry for the question, but you have to start somewhere. I’m starting to pick apart and learn extensions. This is really 2 questions:

  1. I’m seeing this sort of thing a lot: $PREFS->ini(‘site_url’, TRUE), or $PREFS->core_ini[“site_url”], which I sort of get, but is there a complete list of those somewhere? The $PREFS? It may be too early in the a.m. of something.

  2. And somewhat related, how do I get and refer to the name of the System folder when I’m in an extension? For example, there is this line:

'script_url' => $PREFS->ini('site_url', TRUE).'folder1/folder/file.js'

resulting in http://www.site.com/folder1/folder/file.js

If I wanted to put that in the System Folder, how could I reference it? I’m assuming it is something like:

'script_url' => $PREFS->ini('system_folder', TRUE).'folder1/folder/file.js'

resulting in http://www.site.com/system/folder1/folder/file.js

Thanks for helping me get started with this under-the-hood stuff!

       
Daniel Walton's avatar
Daniel Walton
553 posts
17 years ago
Daniel Walton's avatar Daniel Walton

it’s a constant: PATH

so

echo PATH

would produce, on a default installation

./system/

Other constants include:

APP_NAME APP_BUILD CONFIG_FILE PATH_CACHE PATH_LANG PATH_EXT PATH_CORE PATH_TMPL PATH_DICT PATH_MOD PATH_DB PATH_PI PATH_CP PATH_LIB PATH SELF EXT SLASH LD RD

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Thanks for your response. Followup question: where did you gather that list from? I went into the docs and searched for “PATH_MOD” just to see what would come up, and there were no results. Am I looking in the wrong place?

       
Daniel Walton's avatar
Daniel Walton
553 posts
17 years ago
Daniel Walton's avatar Daniel Walton

You’ll find that list in core.system.php

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.