问题:终端远程登陆后经常提示Youhavenewmailin/var/spool/mail/root这个提示是LINUX会定时查看LINUX各种状态做汇总,每经过一段时间会把汇总的信息发送的root的邮箱里,以供有需之时查看。一般这种情况mail的内容就只是一些正常的系统信息或者是比较重要的错误报告。如果你安装了mutt的话直接用这个命令就可以查看mail的内容(用root登陆先),没有装的话用cat/var/spool/mail/root查看(用root登陆先)。如何关闭提示呢?解决方案:第一步:关闭提示echo"unsetMAILCHECK">>/etc/profilesource/etc/profile12第二步:查看ls-lth/var/spool/mail/1第三步:清空cat/dev/null>/var/spool/mail/root1欢迎大家积极留言————————————————原文链接:https://blog.csdn.net/qq_42859864/java/article/details/84937558
php.ini配置对php上传文件大小的影响参数有:配置项可能值功能描述file_uploadsON确定服务器上的PHP脚本是否可以接受HTTP文件上传memory_limit8M设置脚本可以分配的最大内存量,防止失控的脚本独占服务器内存upload_max_filesize改为8M限制PHP处理上传文件的最大值,此值必须小于post_max_size值post_max_size改为16M限制通过POST方法可以接受的信息最大量php.ini配置信息可以在前台输入<?phpechophpinfo();?>进行查看php.ini目录信息。但如果要上传>8M的大体积文件,只设置上述四项还一定能行的通。进一步配置以下的参数max_execution_time=600;每个PHP页面运行的最大时间值(秒),默认30秒max_input_time=600;每个PHP页面接收数据所需的最大时间,默认60秒memory_limit=8m;每个PHP页面所吃掉的最大内存,默认8M把上述参数修改后,在网络所允许的正常情况下,就可以上传大体积文件了max_execution_time=600max_input_time=600memory_limit=32mfile_uploads=onupload_tmp_dir=/tmpupload_max_filesize=32mpost_max_size=32m//类似详解配置php.ini文件(以上传500M以下大小的文件为例)查找以下选项并修改->file_uploads=On;打开文件上传选项upload_max_filesize=500M;上传文件上限如果要上传比较大的文件,仅仅以上两条还不够,必须把服务器缓存上限调大,把脚本最大执行时间变长post_max_size=500M;post上限max_execution_time=1800;Maximumexecutiontimeofeachscript,inseconds脚本最大执行时间max_input_time=1800;Maximumamountoftimeeachscriptmayspendparsingrequestdatamemory_limit=128M;Maximumamountofmemoryascriptmayconsume(128MB)内存上限————————————————原文链接:https://blog.csdn.net/qq_38588845/java/article/details/80770264
方法一:后台找到/dede/templets/diy_main.htm查找:<ahref="../plus/diy.php?action=list&diyid={dede:field.diyid/}"target="_blank"><imgsrc='images/gtk-tmp.png'title='预览'alt='预览'/>前台预览</a>在后面加上: | <ahref='diy_list.php?action=excel&diyid={dede:field.diyid/}'target="_blank">导出表单Excel</a>修改/dede/diy_list.php,在其中搜索:$action=isset($action)&&in_array($action,array('post','list','edit','check','delete'))?$action:'';修改为:$action=isset($action)&&in_array($action,array('post','list','edit','check','delete','excel'))?$action:'';再找到:else{showmsg('未定义操作',"-1");}在它前面添加:elseif($action=='excel'){ob_end_clean();//清除缓冲区,避免乱码header("Content-type:application/vnd.ms-excel");header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls");print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom$fieldlist=$diy->getFieldList();echo"<table><tr>";foreach($fieldlistas$field=>$fielddata){echo"<th>{$fielddata[0]}</th>";}echo"<th>状态</th>";echo"</tr>";$sql="SELECT*FROM{$diy->table}ORDERBYidDESC";$dsql->SetQuery($sql);$dsql->Execute('t');while($arr=$dsql->GetArray('t')){echo"<tr>";foreach($fieldlistas$key=>$field){echo"<td>".$arr[$key]."</td>";}$status=$arr['ifcheck']==1?'已审核':'未审核';echo"<td>".$status."</td>";echo"</tr>";}echo"</table>";}方法二,较麻烦,未亲测:1.首先在后台找到/dede/templets/diy_main.htm,查找:<ahref="../plus/diy.php?action=list&diyid={dede:field.diyid/}"target="_blank"><imgsrc='images/gtk-tmp.png'title='预览'alt='预览'/>前台预览</a>在后面加上: | <ahref="../plus/diy.php?action=daochu&diyid={dede:field.diyid/}"target="_blank">导出为EXCEL</a>2、核心内容修改plus/diy.php$action=isset($action)&&in_array($action,array('post','list','view'))?$action:'post';替换成:$action=isset($action)&&in_array($action,array('post','list','view','daochu'))?$action:'post';3、再在plus/diy.php最后一行下面新加代码:elseif($action=='daochu'){ob_end_clean();//清除缓冲区,避免乱码header("Content-type:application/vnd.ms-excel;");Header("Content-Disposition:attachment;filename={$diy->table}_".date("Y-m-d").".xls");print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom$query="desc`{$diy->table}`";$res=mysql_query($query);echo"<table><tr>";//导出表头(也就是表中拥有的字段)while($row=mysql_fetch_array($res)){$t_field[]=$row['Field'];//Field中的F要大写,否则没有结果/*echo"<th>".$row['Field']."</th>";*/if($row['Field']=='id'){echo"<th>ID</th>";}elseif($row['Field']=='gsm'){echo"<th>公司名</th>";}elseif($row['Field']=='xm'){echo"<th>姓名</th>";}elseif($row['Field']=='sj'){echo"<th>手机号码</th>";}elseif($row['Field']=='yx'){echo"<th>电子邮箱</th>";}else{echo"<th></th>";}}echo"</tr>";//导出数据$sql="select*from`{$diy->table}`";$res=mysql_query($sql);while($row=mysql_fetch_array($res)){echo"<tr>";foreach($t_fieldas$f_key){echo"<td>".$row[$f_key]."</td>";}echo"</tr>";}echo"</table>";}原文地址:https://blog.csdn.net/jklgfgdsr/article/details/79311950
html中写:<scriptsrc="http://pv.sohu.com/cityjson?ie=utf-8"></script><script>varcityCode=returnCitySN.cid;document.write(JSON.stringify(returnCitySN.cname));</script>使用到的js代码:<scriptsrc="http://pv.sohu.com/cityjson?ie=utf-8"></script><script>console.log(returnCitySN);//returnCitySN就是用户的ip相关信息;console.log(returnCitySN.cid);//330100console.log(returnCitySN.cip);//183.128.165.1xxconsole.log(returnCitySN.cname);//浙江省杭州市</script>如果要获取当前城市那么就是:<script>varcityCode=returnCitySN.cid;document.write(JSON.stringify(returnCitySN.cname));</script>以上是一种方式,还有另外一种方式,在附件,如果觉得上面的不好用,可以下载附件中的。
除了权限问题,大部分原因是dede的一个bug,就是你直接定义模板名后dede不知道,还是去找默认的模板名,导致提示“dede模板文件不存在,无法解析文档”这种情况最简单的方式就是,找到提示语的php文件,文章是/include/arc.archives.class.php栏目是/include/arc.listview.class.php搜索:模板文件不存在,无法解析文档栏目页修改成:echo$this->Fields['typename']."[ID:{$this->TypeID}]".$GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']."模板文件不存在,无法解析文档!";文章页修改成:echo$GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos["temparticle"]."模板文件不存在,无法解析文档!";如果修改过后,提示的栏目不在你的后台栏目里的话,你需要记下栏目ID,到后台-系统-SQL命令行工具-运行SQL命令行DELETEFROM`#@__arctype`WHEREid='填你记下的栏目ID'转自:https://www.dedehtml.com/notes/get-templeta-file.html
1.新增变量百度站长平台token:cfg_badutoken网站域名:cfg_baiduhost2.打开:/dede/article_add.php搜索:$artUrl=MakeArt($arcID,true,true,$isremote);if($artUrl==''){$artUrl=$cfg_phpurl."/view.php?aid=$arcID";}在下面加入:else{$urls[]='http://'.$cfg_baiduhost.'/'.$artUrl;$api='http://data.zz.baidu.com/urls?site='.$cfg_baiduhost.'&token='.$cfg_badutoken;$ch=curl_init();$options=array(CURLOPT_URL=>$api,CURLOPT_POST=>true,CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>implode("\n",$urls),CURLOPT_HTTPHEADER=>array('Content-Type:text/plain'),);curl_setopt_array($ch,$options);$result=curl_exec($ch);}搜索:<ahref='catalog_do.php?cid=$typeid&dopost=listArchives'><u>已发布文章管理</u></a>在下面加入:<u>百度提交返回".$result."</u> 打开:/dede/article_edit.php搜索:$artUrl=MakeArt($arcID,true,true,$isremote);if($artUrl==''){$artUrl=$cfg_phpurl."/view.php?aid=$arcID";}在下面加入:else{$urls[]='http://'.$cfg_baiduhost.'/'.$artUrl;$api='http://data.zz.baidu.com/update?site='.$cfg_baiduhost.'&token='.$cfg_badutoken;$ch=curl_init();$options=array(CURLOPT_URL=>$api,CURLOPT_POST=>true,CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>implode("\n",$urls),CURLOPT_HTTPHEADER=>array('Content-Type:text/plain'),);curl_setopt_array($ch,$options);$result=curl_exec($ch);}搜索:<ahref='catalog_do.php?cid=$typeid&dopost=listArchives'><u>管理文章</u></a>在下面加入:<u>百度提交返回".$result."</u> 完成,最后附加个百度自动推送代码,只需要把以下js做到每个页面的html中即可,自动推送和主动推送可以同时使用,进行互补。<script>(function(){varbp=document.createElement('script');varcurProtocol=window.location.protocol.split(':')[0];if(curProtocol==='https'){bp.src='https://zz.bdstatic.com/linksubmit/push.js';}else{bp.src='http://push.zhanzhang.baidu.com/push.js';}vars=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(bp,s);})();</script>