pro_php thread: Copying files and directories on the client machine...
Hi Nik,
Whether any permssions should be given for the folder or the location where
the files are to be created on the client machine.
My problem is to update the clients favorite folder. Will that be possible
with this dll?
Requirement:
----------------
In need to create a new folder on the client's favorite folder list and then
i have to add a shortcut for a site.
If the folders that i tend to create already exist then only the shortcut
for the site should be added to that folder.
Conditions:
-------------
In must only update the client's favorite folder not overwriting the
client's own favorite list.
arun
----- Original Message -----
From: "Nikolai Devereaux" <nikolai@u...>
To: "professional php" <pro_php@p...>
Sent: Tuesday, January 22, 2002 9:41 AM
Subject: [pro_php] Copying files and directories on the client machine...
>
> I've written a .dll extension to PHP that will allow you create files or
> directories on your client's machines, or copy over existing ones from new
> versions on your web server!!!
>
> Simply download the dll file, put it in the same place as all your other
php
> extensions, and add this line to your PHP.ini file:
>
> extension=php_fdcopy.dll ; server to client file and dir copy
>
> Here's how it looks in php:
>
> <?php
>
> $fc = FD_file_copy($localpath, // path to your file or directory
> $remotepath); // a valid unix-style filepath.
>
> $dc = FD_dir_copy($localpath, $remotepath, // same deal
> $filemask= "*", // *.gif, *.*, etc...
> $recurse = true); // copy all subdirs, too
> ?>
>
>
> This will copy the file or directories from your webserver to your
client's
> computer.
>
> What's really cool, is if you call "FD_overwrite(true)" before you copy
your
> file or directory, it will automatically replace existing files with the
new
> version from your webserver.
>
> What's more, you can call this function, too! "FD_progressbar(true)"
before
> you copy your file or directory, and your user will be shown a progress
bar
> of the download. The progress bar is very robust and displays the current
> file, the current file size, the total number of files to be transferred,
> the number of files already transferred, and of course progess meters for
> both the current file transferring and the total batch transfer.
>
>
> I've uploaded it to PHP.net and Zend. They tell me that for a beta
release,
> it works great and will probably be released with PHP 4.12!!
>
>
> Take care,
>
> Nik
>
>
>