<?php
file ="/PhpProject1/sample.txt";// The new person to add to the filetest = " Tutorialspoint";// using the FILE_APPEND flag to append the content to the end of the file// and the LOCK_EX flag to prevent anyone else writing to the file at the same timefile_put_contents(file,test,FILE_APPEND|LOCK_EX);echo"Content has been loaded successfully";?>