Home > Software engineering >  Vb how to realize the remote create text
Vb how to realize the remote create text

Time:09-23

I have a web site, I want to use vb to create a TXT file on the site, content is Text1 content, the content of the title is also Text1
Please give a complete source code

CodePudding user response:

no

CodePudding user response:

CodePudding user response:

Fyi:
 ServerShare="\ \ 192.168.3.56 \ d $" 
The UserName="somedomain \ someuser"
Password="somepassword"

The Set NetworkObject=CreateObject (" work "WScript.Net

NetworkObject. MapNetworkDrive ", "ServerShare, False, UserName, Password,"

The Set of FSO=CreateObject (" Scripting. FileSystemObject ")
Set the Directory=FSO. GetFolder (ServerShare)
For Each FileName In the Directory. The Files
WScript. Echo FileName. The Name
Next
Set the FileName=Nothing
Set the Directory=Nothing
The Set of FSO=Nothing

NetworkObject. RemoveNetworkDrive ServerShare, True, False

The Set NetworkObject=Nothing

CodePudding user response:

The
refer to the original poster qq_17399763 response:
I have a web site, I want to use vb to create a TXT file on the site, content is the content of the Text1, title is also the content of the Text1
Please give a complete source code


Problem is not particularly clear, you mean the client to create a text file, and then using VB to this text files uploaded to the website server?
Web site may be needed if it is estimated, the upload directory information, such as using VB Inet control to connect to the web site of the Ftp address, reuse CommonDialog controls find hard disk need to upload the text file, it can be uploaded to the server url,
If not do not know your intentions,

CodePudding user response:

1. Do not require security, can use a Shared folder,
"
2. If you have any requirements on the security, but is not strong, and can in the remote open FTP service, can use FTP upload method,

3. If there are higher requirements for security, you can use the S/C (server/client) model, and put a service on the server side (of course, also want to be formulated by yourself), then your client to the server to send information (name, can contain storage location, and the file data), the server receives stored in the specified location, is like an automated QQ file transfer, say this way is more safe, because you can control and set up any layers and any form of security measures (password and data encryption),

By theforever @ csdn.net
  • Related