I have a folder in magento root dir with a php script and want to run/output it in a block. What code is needed to run the script in a block?


You can try using include inside block's template.

| improve this answer | |
  • Can you give an example of the code needed? – Bas Nov 6 '17 at 13:44
  • Inside .phtml: <?php include "path/to/external.php"; ?> – Sinisa Colic Nov 6 '17 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.