There are 2 files: index.php, main.class.php

Main.class.php contains the function

private function getproxy($type) { $text = file_get_contents(__DIR__."/app/temp/$type.txt"); echo nl2br( htmlspecialchars($text) ); } 

and displays it accordingly in index.php but at the very beginning.

enter image description here

And it is necessary that he deduced it somewhere in the container (that is, not at the very top.) I do not understand php.

  • one
    In the index.php file at the very beginning, find the place where this function is displayed and move it down to the block you need. - Dmitry B.

1 answer 1

If at level 1 there are files then monzho so, in the index, specify in any block, say div like this

 <div> <?php include(dirname(__FILE__) . "/main.class.php"); ?> </div>