Welcome Guest, Not a member yet? Register   Sign In
Include a extern php file...
#3

[eluser]Rick Jolly[/eluser]
[quote author="Troian" date="1184036478"]
I´m trying to include a extern php file, I received no error messages em I use this:
include(base_url().'public/includes/funcoes.php');
[/quote]

Use the constant APPPATH instead of base_url(). When you include a php file using the url through http, the file will be executed and the result will be included. That is not normally what you'd want.

However, using a helper as you have (or a library) is the CI way to include functions and classes. You can call the functions in the view, but it is probably best to load the helper in the controller.


Messages In This Thread
Include a extern php file... - by El Forum - 07-09-2007, 04:01 PM
Include a extern php file... - by El Forum - 07-09-2007, 05:29 PM
Include a extern php file... - by El Forum - 07-09-2007, 07:24 PM
Include a extern php file... - by El Forum - 07-09-2007, 10:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB