0

A simple question that i cant resolve, how can i include a php file (with array) in the controler. When is place the file in src (not the good place, but for the example), the file is not found

$kenmerken = include('../src/1_vakantie-en-recreatie.php'); 
3
  • Have you tried with absolute server path? Commented Jan 31, 2019 at 11:05
  • How does that look like? Commented Jan 31, 2019 at 12:19
  • '/var/www/project-directory/path/to/src/1_vakantie-en-recreatie.php' in example. Commented Jan 31, 2019 at 13:32

1 Answer 1

1

I think your answer is here: how to include file in zend framework controller?

If this didn't solved your problem let me know. good luck!

Sign up to request clarification or add additional context in comments.

2 Comments

Not working (bacause of old version of ZF in that question i think)
Try using this absolute path: $paths = array( realpath(dirname(__FILE__) . '/../library'), '.', ); set_include_path(implode(PATH_SEPARATOR, $paths); source: framework.zend.com/manual/1.11/en/performance.classloading.html If you still have the same problem please give us more info about the error you're having and the version you are using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.