Add all *.hlp files from the current folder to the compressed file help.rar
winrar a help *.hlp
To add comments from the file, you can use -z
winrar c -zinfo.txt dummy
In this way, we can call cmd through the php tutorial and run the above two winrar parameters to batch modify the comments of the rar file and add the compressed file. Required Note that PHP cannot directly call cmd when the safe mode is opened.
The following code is how I read the file path through my database tutorial and finally achieve batch modification of rar file comments. .Because the database is access, I created a new odbc source. At the same time, rar.exe and cmd.exe are both in the same directory as 1.php
I also encountered this recently. Such a problem troubled me a lot. Later, after carefully looking through the help file of winrar, I found that we can make batch modifications through the following method.
$id=$_get[ id];
if($id==”")
{
echo “parameter error”;
exit;
}
if($id>=400)
{
echo “all over”;
exit;
}
$db=odbc_connect(”dw”,””,””);
$sql=”select * from ` download` where `id`=$id”;
$query=odbc_exec($db,$sql);
$filename=odbc_result($query,2);
if($filename==” ")
{}
}//Read the file name and check whether the file exists
$filename=str_replace("#1′,"",$filename);
$filename=str_replace("#2′,"",$ filename);
$filename=”soft/”.$filename;
echo $filename.”
”;
if(!file_exists($filename))
{
echo "The file does not exist, go to the next id";
$id++; test/1.php?id=$id'>”;
exit;else
{
`winrar a $filename Instructions for use.txt`;
echo “Inserting the description file successfully”;
$id++;
echo “”;
}
odbc_close($db);
?>
× × × × × × × × × × × × × × × × 🎜>However, at some point, the rar files we usually collect are annotated in batches. At this time, if you put these data on your own website, it is tantamount to advertising for others.
We opened the help file of winrar, and the help file mentioned that on the command line The two parameters for modifying rar file comments and adding compressed files in mode are ac. The description file for winrar is as follows:
Add all *.hlp files from the current folder to the compressed file help.rar
winrar a help *.hlp
To add comments from a file you can use the -z
winrar c -zinfo.txt dummy
1 2
http://www.bkjia.com/PHPjc/444799.html