references:joomla.framework:filesystem:jfile-movemove
Moves a file. If the current user has permission and safe mode is turned off, then this function will use the PHP rename function. Otherwise, the function will use FTP (if enabled) to move the file. The function returns true if the file was successfully moved. Otherwise, the function returns false and may raise a warning using the JError class. Syntaxboolean move ( $src, $dest, $path )
ExamplesExample: This example moves a file. Example if (JFile::move( 'clock.jpg', 'clock_moved.jpg', 'images/stories/' )) { echo "<h3>File Successfully Moved</h3>"; } else { echo "<h3>Could not move file</h3>"; } Discussion |


