Home > Backend Development > PHP Tutorial > PHP adds decompression instructions to rar files and implements the code_PHP tutorial

PHP adds decompression instructions to rar files and implements the code_PHP tutorial

WBOY
Release: 2016-07-20 11:09:01
Original
907 people have browsed it

The following code is how I read the file path through my database tutorial and finally implemented 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 In the same directory as the 1.php tutorial

$id=$_get[id];
if($id=="")
{
echo "Parameter error";
exit;
}
if($id>=400)
{
echo "All ends";
exit ;
}
$db=odbc_connect("dw","","");
$sql="select * from 'download' where 'id'=$id";
$ query=odbc_exec($db,$sql);
$filename=odbc_result($query,2);
if($filename=="")
{

}
$filename=str_replace("#1′,"",$filename);
$filename=str_replace("#2′,"",$filename);
$filename="soft/".$ filename;
echo $filename."
";
if(!file_exists($filename))
{
echo "File does not exist, go to next id";
$id++;
echo "

content='0;url=../test/1.php?id=$id'>";
exit;
}//Read the file name and check whether the file exists
else
{
'winrar a $filename usage instructions.txt';
echo "Insert instructions File successful";
$id++;
echo "";
}
odbc_close($db);
?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444825.htmlTechArticleThe following code is how I read the file path through my database tutorial and finally achieve batch modification of rar file comments. Method. Because the database is access, I created a new odbc source. At the same time...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template