I haven't written a blog for a long time. Last week, I tested the project and found some bugs. One of them is a bit confusing. The description is as follows: The project is deployed on Windows, and the image upload function is normal. When deployed on a Linux server, an inexplicable error occurs (probably because I am mentally retarded and actually forgot* Differences between Linux and Windows file directories*) Normally it should be like this: In fact, it is like this: Tudou, who had never encountered such a problem, was also a little confused. No matter what, I restarted the project first, but path += "\\" + dirName + "\\" + ymd + "\\"; The result on Linux will be: This is obviously different from the path we expected. Yes, I believe that students with a little computer knowledge can see what the problem is. That's right, just change \ to / and it will be ok. It's really smart and refreshing, but a moment of stupidity ruined half a day. //Note that there are differences between Linux and Windows. Linux uses \ and Windows uses // /*path += "\\" + dirName + "\\" + ymd + "\\"; pathsrc += "\\" + dirName + "\\" + ymd + "\\";*/ path += "/" + dirName + "/" + ymd + "/"; pathsrc += "/" + dirName + "/" + ymd + "/"; Summarize The above is what I introduced to you. There is no problem with the Linux file path for window and Linux project deployment. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL 8.0.15 download and installation detailed tutorial is a must for novices!
>>: JD Vue3 component library supports the detailed process of mini program development
mysql-8.0.19-winx64 downloaded from the official ...
1. CSS Navigation Bar (1) Function of the navigat...
Recently, I ran a spark streaming program in a ha...
In MySQL, create a new table with three fields, i...
The specific code for implementing the retractabl...
[Looking at all the migration files on the Intern...
background Before starting the article, let’s bri...
Label display mode (important) div and span tags ...
Zero, Background I received a lot of alerts this ...
Preface: The MySQL database provides a wide range...
The installation tutorial of MySQL 5.7.19 winx64 ...
This article records the detailed tutorial of MyS...
As a powerful editor with rich options, Vim is lo...
Use CSS3 to achieve cool radar scanning pictures:...
Table of contents 1. Original demand 2. Solution ...