Welcome Guest, Not a member yet? Register   Sign In
Direct echo in Controller - bad parctice?
#11

(04-03-2015, 11:12 AM)CroNiX Wrote: Why does there need to be a warning? In MVC, you use VIEWS, so it should be understood. None of the docs or tutorials show echoing from a controller.

I'm not trying to be awkward, but http://www.codeigniter.com/userguide3/ge...llers.html contains a direct echo early on under the sub-heading "Let's try it: Hello World". As such, I think it could do with a reminder that this is for debugging and/or a description of when (if ever) you might do this in a production controller.

What I really need is a simple example showing the right way to get javascript like jQuery into the <head></head> of a website that is built with CodeIgniter - or is this a meaningless question because there is a Better Way?

Chris.
Reply


Messages In This Thread
RE: Direct echo in Controller - bad parctice? - by ChrisRitson - 04-03-2015, 02:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB