How to load a file with variables?

0 like 0 dislike
3 views
There are multiple landing pages with one form. The form file is created separately and loaded using the class object, directly in the html file of the landing page.
In the form file there are some variables (action, id,...). Now I have a simple include, I set the necessary variables before loading the file.
You can also use a buffer of the regular season and file_get_contents() - as properly at jedicke?
by | 3 views

2 Answers

0 like 0 dislike
In General, made so:
if (is_file($this->_formFilePath)){ extract($this->_varsArray); ob_start(); include $this->_formFilePath; $result = ob_get_clean(); }

Shall take the Jedi approach ;)
by
0 like 0 dislike
In jedicke is to use some template engine.
by

Related questions

0 like 0 dislike
3 answers
asked Aug 6, 2019 by YakushinIlya
0 like 0 dislike
1 answer
asked May 21, 2019 by Miryl
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked Apr 11, 2019 by bogdan_uman
110,608 questions
257,186 answers
0 comments
33,687 users