panique / mini3

Just an extremely simple naked PHP application, useful for small projects and quick prototypes.
274 stars 100 forks source link

How to load an inner html included into a php file #34

Closed abelardolg closed 7 years ago

abelardolg commented 7 years ago

Hi everyone,

When HomeController is called, is executed three "require" statements:

require APP . 'view/_templates/header.php';
        require APP . 'view/index.php';
        require APP . 'view/_templates/footer.php';

Inside the 'view/index.php' file, there is this statement: <div w3-include-html="http:<?php echo URL; ?>Mini/view/landpage/formSuscripcion.html"></div>

The 'w3-include-html' tag works -> more reference at: https://www.w3schools.com/howto/howto_html_include.asp

When MIni3 loads this line, shows an error. How could I load that 'formSuscripcion.html' file?

Let me know if you have encountered my issue.

Any help would be welcome.

Best regards.

abelardolg commented 7 years ago

This is the message showed from ErrorController: This is the Error-page. Will be shown when a page (= controller / method) does not exist.

I understand that this error is generated because at the line: <div w3-include-html="http:<?php echo URL; ?>Mini/view/landpage/formSuscripcion.html"></div>. This should be called by another way to load this html but I don't know which one.

Any help?

Best regards.

panique commented 7 years ago

Sorry i have absolutly no idea what you want to say

panique commented 7 years ago

Are you sure you have read the readme ? This is a little framework and it's not about including HTML files, maybe you look at the documentation again, it will probably solve your problem

abelardolg commented 7 years ago

Hi @panique I have read the documentation and your framework works fine but when I want to include this inner html it doesn't work: cause that error message.

How would I write that line to load that html?

Best regards.