In one of my project I wanted to keep HTTP path in the constant file, but when i am declaring say define(“STATIC_PATH”, base_url().’static/profile_images’);
It’s throwing error. how it can be fixed, i know alternative method but wanted to keep it in same file.
Thanks
You can’t declare a constant with functions in PHP, only scalar and null values are allowed.
Scalar values are: integer, float, string and boolean.
So you should define your constant writing down the URL by hand.