references:joomla.framework:filesystem:jfile-writewrite
Write a string to a file. If the current user has permission and safe mode is turned off, then this function will use the PHP file_put_contents function. Otherwise, the function will use FTP (if enabled) to write the file. The function returns true if the write operation was successful. Otherwise, the function returns false and may raise a warning using the JError class. Syntaxboolean write ( $file, $buffer )
ExamplesExample: This example writes some text to a file. Example $buffer = "Joomla! is one of the most powerful Open Source Content Management Systems on the planet. It is used all over the world for everything from simple websites to complex corporate applications. Joomla! is easy to install, simple to manage, and reliable. "; $file = 'joomlablurb.txt'; JFile::write( $file, $buffer ); Discussion |


