Welcome Guest, Not a member yet? Register   Sign In
[Solved] Image Manipulation Class
#5

(01-17-2020, 10:57 PM)littlej Wrote: Hello mate !

When using "../", the path is relative to the location of the file on the server.
When using "base_url", the path is relative to the public location of the file.

"base_url" will add "https://my.domain.com/" in front, which means that the file must be publicly accessible, and must be located in the "public" folder.

For instance, if we want to include a php file, we will do "include APPPATH. 'Libraries/myfile.php';". But you can not do something like "include base_url ('../app/Libraries/myfile.php');" because the "app" folder is not publicly accessible.

So, it is "normal" that base_url is not working. It is used when you want to provide a public link (a link that will probably be displayed on the page for the final user).

You probably don't want to use "base_url()" in your controller (at least for what you are doing).

Thanks!
Reply


Messages In This Thread
[Solved] Image Manipulation Class - by PHS - 01-17-2020, 07:40 PM
RE: Image Manipulation Class - by Dedov_Evgeniy - 01-17-2020, 10:54 PM
RE: Image Manipulation Class - by PHS - 01-18-2020, 08:50 AM
RE: Image Manipulation Class - by littlej - 01-17-2020, 10:57 PM
RE: Image Manipulation Class - by PHS - 01-18-2020, 08:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB