Is it possible to insert php code in an iframe?

190 Views Asked by At

I have written an PHP file editor and interpreter (basically the output window in as an iframe) in PHP (HTML,CSS,JS [ace.js]).

Now I want to give the user an option to modify the level of error reporting without changing the contents of the file. Normally, one would use the function error_reporting to it by calling the method at the start of the php file...but here I do not want to change the contents of the file.

Is there any way I can dynamically run PHP code in order to prepend error_reporting(level); at the start of the file or maybe is there any other workaround to solve the same problem?

Please let me know if any more information is needed. By default, the iframe's src points to the file the editor is editing.

0

There are 0 best solutions below