javascript - How to remove this suffix when saving this web page?
为情所困
为情所困 2017-06-20 10:07:28
0
2
720

I open bilibili and then use ctrol s to save all the resources of this webpage, but the local files have many extra suffixes?
Should I manually remove them one by one? The chrome browser I use

Is there any way to avoid or modify it, or is there a better way to download web resources?

为情所困
为情所困

reply all(2)
大家讲道理

I wrote a code for your file to help you process it. First create a php file in your folder, put the following code in it and run it once. Please accept and like it, thank you.

<?php
    $dir="./";
    $file=scandir($dir);
    for ($i=0; $i < count($file); $i++) { 
        if (strpos($file[$i], "@")) {
            $arr = explode("@",$file[$i]);
            rename($file[$i], $arr[0]);
        }
        if (strpos($file[$i], ".下载")) {
            $arr = explode(".下载",$file[$i]);
            rename($file[$i], $arr[0]);
        }
    }
?>
过去多啦不再A梦

This should be because someone has configured a resource server. If you remove it before downloading, the image will no longer be found in the path. It can only be processed after downloading. You can use batch processing to modify the downloaded file name

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!