Good afternoon, I ask for help:

fwrite($fp, ""); 

write to a file: $ fp what is in the file: patternP.php

how to be syntactically correct?

 fwrite($fp, (include'patternP.php';)); 

or how? Tell me please

    1 answer 1

    Use file_get_contents() function

    file_get_contents - Reads the contents of a file into a string.

     fwrite($fp, file_get_contents('patternP.php', true)); 

    Also look at the readfile() function readfile()

    readfile - Reads a file and writes it to the output buffer.