2020-3-23 One hundred and fifty-eight Zero
PHP

The new article was released to Baidu to open the file /dede/article_ first. Add.php File, this is the article issue the file, then search / / return the success information, paste the following code $urls=array on the sentence (" Http://www.bp456.cn '.$artUrl); $api=' Http://data.zz.baidu.com/urls? Site=XXXXXXXXX&token=XXXXXXXXXXXX "/ / / get the active interface address $ch=curl_ on Baidu webmaster platform. 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); first, explain this code. If your dream station does not open an absolute address, you can copy it according to this code. If you open an absolute address, do not splice your website in front of $artUrl. Write $artUrl directly. (dream station does not open absolute address by default. If you do not have an impression, you can directly copy my code.) Then change the URL to your own interface. The XXXXXX in the interface address needs to be filled out according to what Baidu has provided to you (it is recommended to copy the entire API address directly to replace me. It is not recommended to copy only the address and Token, maybe the API address of Baidu will be replaced), and then it can realize the automatic push function, but can not see the return value of Baidu. If you need to add, see the return value need to search again to find <u> published articles to manage </u>, and then the next line of the next line of this paragraph. Paste <a><u> to push the feedback result ".$result." </u></a>. Release effect: when generating static, batch push is first required to find /dede/templets/makehtml_. Archives.htm Papers. <tr><tdheight= "20" bgcolor= "#FFFFFF" > each page is generated: </td><tdheight= "20" bgcolor= "#FFFFFF" ><inputname= "PageSize" type= "text" id= "text", "20", "8" > files. Then, whether there is any push code in the back of the code is whether "20", "" "" > need to be pushed: "20", "" "". Ame= "tuisong" type= "radio" value= "0" checked= "checked" / > does not push </label><label><inputname= "tuisong" type= "radio" type= "1" / > push the bar and then open it. Archives_ Action.php The file found in the beginning is $serviterm=empty ($serviterm): "$serviterm"; two lines of code are added below the code, as follows $zongshu= (empty ($zongshu) 0:$zongshu); $tuisong= (empty ($tuisong); 0:$tuisong); these two lines of code, one is the creation of variables to store the total number of successful push, and one is the parameter variable used to receive the push. Continue to find: while ($row=$dsql->GetObject ('out')) {$tjnum++; $id=$row->id; $ac=newArchives ($id); $rurl=$ac->MakeHtml ($isremote);} copy one of the code, to find, you can find this cycle. Then add $urls=array () in front of this code; in $rurl=$ac->MakeHtml ($isremote), add array_ to the next line of this code. Push ($urls, " Http://wwwbp456.cn ".$rurl"; after the while loop was added, push code if ($tuisong==0) {$urls=array ();}else{$api=' Http://data.zz.baidu.com/urls? Site=XXXXXXXXXX&token=XXXXXXX "/ / / get the active interface address $ch=curl_ on Baidu webmaster platform. 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); $result_ Arr=json_ Decode ($result, true); if (! Isset ($result_) Arr['success'])) {$result_ Arr['success']=0;}$zongshu=$zongshu+$result_ Arr['success'];} the XXXXXX in the interface address needs to be filled out according to what Baidu has provided to you (it is recommended to directly copy the entire API address to replace me. It is not recommended to copy only the address and Token, maybe the API address of Baidu will be replaced) continue to search: $nurl= "makehtml_". Archives_ Action.php? Endid= $endid&startid=$startid&typeid=$typeid "replace $nurl=" makehtml_ Archives_ Action.php? Zongshu= $zongshu&tuisong=$tuisong&endid=$endid&startid=$startid&typeid=$typeid; "continue search: ShowMsg (") completes all creation tasks. Look at the whole sentence and replace it with ShowMsg. The total number of successful push: $zongshu<br> Baidu returns information: $result<br> generates files: $totalnum total use time: {$ttime} minutes. "Javascript:"; "here is the end of the tutorial. Effect preview: when you need batch push, you can update the document and generate the corresponding articles. The process of generation will be pushed. In fact, Baidu also provides a push interface for articles modification and article deletion. If you see here, you may understand that you can understand the key core code, and you can implement the modification and deletion of the article. When you need it, update it and delete it.

2020-1-2 Three hundred and forty-three Zero
2020-1-2 Three hundred and fifty-three Zero
Vue

<! DOCTYPEhtml><html><head><metacharset= "UTF-8" /><title>vue</title></head><body><divid= "app" ></div><scriptsrc= " Https://vuejs.org/js/vue.js "The ></script><script>/* parent component passes the value attribute name through datacont. The datacont sub component defines the property name through the value in props to accept the submission father: in the example, click is triggered by the click of the button. In the event, the event name and event value are defined by triggering the custom event of the parent component through this.$emit. After passing several values, we have to define several parameters to receive the parent component to listen and define the same name as the event name. That is, the @baba='reserve'in the example triggers the reserve event when an event is passed. When several events are passed, reserve will receive several values. Then you can use the value passed by the subcomponents */varzizujian={template:`<div> I am the child component {{datacont}}<. Button@click= "Btnclick" > click on father </button></div>`, props:['datacont'], methods:{btnclick () {this.$emit ('baba',' son to father's pass', 'son to father's pass 2'); }}}varfuzujian={template:`<div> I am the parent component {{msg}}{{msg2}}<zizujiandatacont= "ah ah" @baba='reserve'></zizujian></div>`, data () {return{msg:'', msg2:''}}, components:{zizujian}, methods:{reserve (Val, val2) { This.msg=valthis .msg2=val2}}}newVue ({el: "#app", components:{fuzujian}, Template:`<div><fuzujian><divslot= "a" > first dom</div><divslot= "B" > second dom</div><divslot= "C" > third dom</div></fuzujian></div>`. Data:function () {return{}}}) </script></body></html>

2019-12-20 Three hundred and forty-three Zero
2019-12-19 Three hundred and seventy-four Zero