Create file named flag.php and request it

Hello,

I am doing the PUT and DELETE methods in the academy. The question is: Create a file named “flag.php” with contents ‘<?=`cat /flag.txt`;?>’ and request it to get the flag.
I have been on it for three hours and cannot figure it out. I tried with Burp to do the PUT request in the repeater with the copied content. I have tried with and without apostrophes, with and without <>. Nothing works. I know I have entered the backticks correctly. Regardless of what I write in the file, it always displays the content from the file on the webpage and no flag.
I have also tried to nano a file named flag.php with the copied content from the academy site and POST it on the server, with Burp or with curl and it does not work.

Anything else I can try? I have run out of options at this point.

Don’t quote me but I don’t think repeater will actually upload the file. I had tried the same thing, instead I copied the contents to the proxy and sent it through that way.

Regardless, I just did it with curl as well and it worked fine. DM me the line you are using in curl to PUT the file on the server.