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?

1 Answer 1


You can try using include inside block's template.

  • Can you give an example of the code needed?
    – Bas
    Commented Nov 6, 2017 at 13:44
  • Inside .phtml: <?php include "path/to/external.php"; ?> Commented Nov 6, 2017 at 13:47

Your Answer

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

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