将时间戳插入file_put_contents输出

I'm not quite sure if this is possible as im new to PHP but im trying to insert the date in the format below into my output.txt before the actual line of text.

file_put_contents('output.txt', $data . PHP_EOL, FILE_APPEND);

The date format im trying to define is

date("d/m : H:i :", time()) 

BTW, I know the time format is weird, im using the space : to be followed by the data.

The goal outcome would be:

4/18 : 4:32 : String of text.

What's the questions?

$date = date("d/m : H:i :");
file_put_contents('output.txt', $date.$data.PHP_EOL, FILE_APPEND);

not programmatically but useful ( in windows)

Automatically insert timestamp everytime a file is opened:

1. Open notepad
2. On the first line of the file type this:
.LOG

3. Hit ENTER to insert one carriage return.
4. Save the file

Now… everytime you open the file in notepad, a timestamp will be inserted.

$date = date("d/m : H:i :"); file_put_contents('response.txt', $date . file_get_contents('php://input'),FILE_APPEND);