Re: File moving hell on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Mackintosh wrote:
>> What protocol are you targeting? FTP, SFTP, SSH, SMB, etc? 
From: Brian Dunning <brian@xxxxxxxxxxxxxxxx>
> Regular Windows networking.

If you're using a 'Doze box, and you want to use PHP functions like rename(),
then IIRC the only real option that you have is to do something like:

system("net use m: \\BORG\SHARE PASSWORD /user:DOMAIN\USER");
system("net use n: \\MACHINE\SHARE2 PASSWORD2 /user:DOMAIN2\USER2");
rename("n:/path/to/file","m:/path/to/otherfile");
/* more stuff */
system("net use n: \\MACHINE\SHARE2 /delete");
// equivalent of "umount //machine/share2"

However, there may be a better/easier/more elegant way to do these things. 
Not sure; our PHP-running machines are all running Linux.

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux