如何在C#中保存其他PC的数据? [英] how to save data other pc in C#?

查看:84
本文介绍了如何在C#中保存其他PC的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到问题:我和我的朋友使用两台电脑并使用WiFi连接并使用XAMPP服务器。我需要所有数据使用此连接保存一台PC XAMPP服务器。如何在PHP或C#中实现?请帮助我。

I Face a problem: Me and my friend using two pc and used WiFi Connection and used XAMPP Server. I need all data save one pc XAMPP Server using this connection. How to possible in php or C#? plz some one help me.

推荐答案

var fileName = "Sample.txt";   // File on Local Computer
var local = Path.Combine(@"C:\Temp", fileName);   //Path on Local Computer
var remote = Path.Combine(@"\\remote.machine\d


\,fileName);
File.Copy(本地,远程);
\", fileName); File.Copy(local, remote);





@\\remote。 machine \d



@"\\remote.machine\d


\应该是您要将文件复制到的远程计算机名和共享文件夹。当然,您还需要更改文件名和本地路径以满足您的需求。
\" should be your remote computer name and shared folder to copy the file to. Of course you will also need to change the file name and local path to match your needs.


这篇关于如何在C#中保存其他PC的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆