-
Convert the local path to a URL-relative path.
private string urlconvertor(string imagesurl1)
string tmprootdir = Get the root directory of the program.
string imagesurl2 = , "");Convert to a relative path.
imagesurl2 = "\", @"/");
return imagesurl2;
The relative path is converted to the server's local physical path.
private string urlconvertorlocal(string imagesurl1)
string tmprootdir = Get the root directory of the program.
string imagesurl2 = tmprootdir + "/", @"\");Convert to an absolute path.
return imagesurl2;
-
The physical path is the absolute path, and the virtual path is the relative path. The absolute path is the absolute location of the specified file.
As we all know, when we usually use the computer, we must know the location of the file to find the file we need, and the way to represent the location of the file is the path, for example, as long as we see this path: c: website img we know that the file is in the img subdirectory under the website directory of the c drive.
In this way, the path to the location of the complete description file is the absolute path. We don't need to know anything else to figure out the location of a file based on the absolute path.
The so-called relative path, as the name suggests, is the relative position of oneself and the target. Regardless of whether these files are placed in **, as long as their relative relationship does not change, there is no mistake.
-
Convert the local path to a URL-relative path.
private string urlconvertor(string imagesurl1)
string tmprootdir = Get the root directory of the program.
string imagesurl2 = , "");Convert to a relative path.
imagesurl2 = "\", @"/");
return imagesurl2;
The relative path is converted to the server's local physical path.
private string urlconvertorlocal(string imagesurl1)
string tmprootdir = Get the root directory of the program.
string imagesurl2 = tmprootdir + "/", @"\");Convert to an absolute path.
return imagesurl2;
You save the path in an XML and read it out the next time you start it.
I think it's time to buy a VB book. Break the bank!
There are roughly six levels of learning physics, that is, first to understand, then to remember, to practice, to become proficient, to practice to make perfect, to innovate, from the initial goal of basic knowledge, and finally to the highest level of learning physics. >>>More
1. First plug the hard disk into the computer and back up the data of the hard disk to the computer. >>>More
Don't care about the times.
Virtual memory: 1. Right-click [My Computer] [Properties] [Advanced] tab, 2. Click [Settings] in the [Performance] column to continue clicking the [Advanced] tab, 3. Click [Change] in the [Virtual Memory] column to pop up the [Virtual Memory] dialog box, and you can set it. >>>More