Welcome Guest, Not a member yet? Register   Sign In
base_url() in error_pages
#1

[eluser]Skuja[/eluser]
Hi, i am trying to customize error pages a bit... but i can't find a way to call base_url() function, which is necessary for path of images. Has anybody found a CI hack to acomplish this?
#2

[eluser]TheFuzzy0ne[/eluser]
I'm sure it's possible, but it should be avoided. Your error pages should be viewable without any of the core libraries/helpers being loaded.

Why not write your own helper that you can just include/require? The helper file can load the configuration itself.
#3

[eluser]Skuja[/eluser]
[quote author="TheFuzzy0ne" date="1238175777"]
Why not write your own helper that you can just include/require? The helper file can load the configuration itself.[/quote]

Didn't get this. Whats the purpose of writing my own helpers, if i am not allowed to load them in error pages.

All i want to do is to access my base url variable without redefining it in multiple places.
#4

[eluser]TheFuzzy0ne[/eluser]
You can do whatever you want from within your error page using includes and requires. Just avoid the assumption that the CI Super Object is fully instantiated.




Theme © iAndrew 2016 - Forum software by © MyBB