Home >Backend Development >PHP Tutorial >Batch modify php code of RAR file comments_PHP tutorial
We open the help file of WINRAR. The help file mentions that the two parameters for modifying RAR file comments and adding compressed files in command line mode are AC. The description file of WINRAR is as follows:
Add all * from the current folder. hlp file to the compressed file help.rar
WinRAR a help *.hlp
To add comments from the file, you can use the -z
WinRAR c -zinfo.txt dummy
In this way, we can call CMD through PHP and run the above two WINRAR parameters to batch modify comments of RAR files and add compressed files. Need to pay attention The thing is, PHP cannot directly call CMD when safe mode is turned on.
The following code is how I read the file path through my database and finally implement batch modification of RAR file comments. Because The database is ACCESS, and I created a new ODBC source. At the same time, RAR.exe and CMD.EXE are both in the same directory as 1.PHP