D
D
David Martin2013-12-10 16:54:23
PHP
David Martin, 2013-12-10 16:54:23

How to organize file copying on localhost, xampp, php?

There is a product parser written in php.
Literally a couple of lines, grabs everything from cvs from the supplier, puts it in our database + puts pictures in the prod daddy, renaming them in advance.
Everything works fine on the server, but, on the local machine, there are problems, the pictures are not copied, here I think the problem is with admin rights, in the process of parsing, if you open the prod folder, you can see how jpg appear there and then disappear, flickering, roughly speaking, one at a time file.
It is necessary to execute this parser on the local machine.
Windows 8.1

$file1 = $row['0'];
            $local_file = $file1 . '.jpg';
            if (!file_exists('prod/' . $local_file)):
                $catalog = explode('-', $file1);
                ftp_chdir($open, $catalog[0]);
                $reso = ftp_size($open, $local_file);
                if ($reso != -1) {
                    ftp_get($open, 'prod/' . $local_file, $local_file, FTP_BINARY);
                }
                ftp_cdup($open);
            endif;
            mysql_query($sql);
            $id++;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2013-12-10
@Nc_Soft

Localize the problem, just try to download 1 file via FTP with the same commands.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question