php-sitemap icon indicating copy to clipboard operation
php-sitemap copied to clipboard

The file sitemap.index.xml can not be overwritten

Open Hanhan1989 opened this issue 5 years ago • 0 comments

The file sitemap.index.xml can not be overwritten. It shows me the following message Cannot create sitemap. File '/var/www/html/sitemap.index.xml' already exists.

I have to put this code before new Sitemap( )...

   if(file_exists('sitemap.index.xml')){
        unlink('sitemap.index.xml');
    }

Hanhan1989 avatar Jun 04 '19 21:06 Hanhan1989