php - Attempting to copy a file from one directory to another in codeigniter -


I try to do some theme structure in my CMS, where you can select a theme for the front-end website I am doing. It is a part of my code below, as a certain topic is active, it is an idea that it means that the files copy the file folder into a folder in the folder from the theme directory (in some upload directory); Idea in codeigniter It's not really codeigniter specific, but I'm still trying to copy my files and copy existing theme files and keep the file here even if it does not exist.

  $ ->; Data ['main_url'] = FAPAT 'property / topics' $ name; foreach ($ (this- & gt; data- $ ['main_url'] '$ /' as file $ '/.php')) {if (file_exists ($ file)) {if (basename (file $) == ' _main_layout.php '|| basename ($ file) ==' _login_layout.php '|| basename ($ file) ==' _register_layout.php) '(ideas /' basename ($ file) {copy $ file, APPPATH. ' .); } And {$ this- & gt; Data ['Errors'] [] =' Please note that you included an invalid file that contains valid files in the MAIN directory: _main_layout.php, _login_layout.php, and _register_layout.php. Please see the documentation for more information. '; }}}   

Does anybody know what I am doing wrong here? . Thanks

Edit: I am getting no errors and files are not copied over existing files nor copying and adding new files

The main_url path should be the wrong, correct path:

  $ this-> Data ['main_url'] = FCPATH. 'Property / topics /' $ name;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -