wordpress - How to get the current project name in php code?
689
I'm new to php. I want to use function get project name but i don't know how. Example:
F:\VertrigoServ\www\first_wordpress...
project name is "first_wordpress".
Pleas help me.
Thanks! Sorry for my english.
Answer
Solution:
This is hard to get because of some reasons:
What I suggest is to have a config file with some values that are constant in your project and that are going to stay always the same, like your project name.
I would create this:
constants.php
and then include it in the file you need it, for example
index.php
I guess that you are using Wordpress, so your constant file, or config, is called wp-config.php. Try that!
Edit: a user of php.net brings this solution.
I hope it helps!