|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/conceptlabs1/classes/ |
Upload File : |
<?php
/**
* Common class to set file content
*/
class SetContent
{
/**
* function to set file content
* @param filepath path to file
* @param content content to set
*/
function setContentToFile($filepath, $content)
{
@ chmod($filepath, 0774);
file_put_contents($filepath, $content);
@ chmod($filepath, 0774);
}
/**
* function to append content to file
* @param filepath path to file
* @param content content to append
*/
function appendContentToFile($filepath, $content)
{
@ chmod($filepath, 0774);
file_put_contents($filepath, $content, FILE_APPEND | LOCK_EX);
@ chmod($filepath, 0774);
}
}
?>