I have started learning Code Igniter and I am very impressed, and have had an easy time. The only issue I haven’t been able to figure out is how to reference images, javascript, and CSS. I have each as a folder (css,js,img) in the root folder. This works fine for my default view, but breaks with the sub views. How am I supposed to handle this the “code igniter” way?
Share
there is no “codeigniter way” in HTML, because codeigniter is PHP server-side framework, while your problem is client side related
just always use an absolute path to your resources.
will always be fine
note that
/stick at the left. that means “root” of the site, and a path, built from the root, called “absolute”, which mean “always works from anywhere”.Always use absolute path for both filesystem operations and virtual server resources