lecrackffm Posted April 12, 2017 Share Posted April 12, 2017 Hello, im facing a quite odd problem: when im trying to include a piece of code with $files->include it renders the content, in this case a complete <section> ... </section> correctly, but also an additional "1" after the closing tag. When placing the included code directly in the template all works as aspected. So it has to do something with $files->inlcude, right? Thanks, Gregor Link to comment Share on other sites More sharing options...
Zeka Posted April 12, 2017 Share Posted April 12, 2017 Try to use wireRenderFile instead 2 Link to comment Share on other sites More sharing options...
lecrackffm Posted April 12, 2017 Author Share Posted April 12, 2017 It works! Thanks. Can anyone explain, why? Link to comment Share on other sites More sharing options...
Zeka Posted April 12, 2017 Share Posted April 12, 2017 You get "1" because you try to "echo" your include file. The include() method, after successfully including the desired file, returns a TRUE value which, when echo'ed out, is 1. 2 Link to comment Share on other sites More sharing options...
lecrackffm Posted April 13, 2017 Author Share Posted April 13, 2017 Thanks for helping out, Zeka! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now