{"id":31643,"date":"2024-11-25T08:56:51","date_gmt":"2024-11-25T00:56:51","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31643\/"},"modified":"2024-11-25T08:56:51","modified_gmt":"2024-11-25T00:56:51","slug":"phpcms%e4%b8%8d%e6%94%af%e6%8c%81https%e6%80%8e%e4%b9%88%e5%8a%9e","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31643\/","title":{"rendered":"phpcms\u4e0d\u652f\u6301https\u600e\u4e48\u529e"},"content":{"rendered":"<blockquote><p>\n  phpcms\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5\uff1a\u9996\u5148\u627e\u5230\u201cglobal.func.php\u201d\u6587\u4ef6\uff1b\u7136\u540e\u4fee\u6539\u4ee3\u7801\u4e3a\u201c$url = str_replace(array(&#8216;https:\/\/&#8217;,&#8217;\/\/&#8217;,&#8217;~&#8217;)\u201d\uff1b\u6700\u540e\u4fee\u6539content_list\u6587\u4ef6\u5373\u53ef\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5f0bd3c6c9d7f614.jpg\" class=\"aligncenter\" title=\"phpcms\u4e0d\u652f\u6301https\u600e\u4e48\u529e\u63d2\u56fe\" alt=\"phpcms\u4e0d\u652f\u6301https\u600e\u4e48\u529e\u63d2\u56fe\" \/><\/p>\n<p><strong><br \/><\/strong><\/p>\n<p><strong>Phpcms\u5347\u7ea7:\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5<\/strong><\/p>\n<p>Phpcms V9 \u5347\u7ea7\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5<\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>1\u3001libs unctionsglobal.func.php<\/p>\n<p>\u627e\u5230\uff1a<\/p>\n<pre>$url&nbsp;=&nbsp;str_replace(array('http:\/\/','\/\/','~'),&nbsp;array('~','\/','http:\/\/'),&nbsp;$url);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u66ff\u6362\u4e3a\uff1a<\/p>\n<pre>$url&nbsp;=&nbsp;str_replace(array('https:\/\/','\/\/','~'),&nbsp;array('~','\/','https:\/\/'),&nbsp;$url);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>2\uff1aphpcmsmodulescontent emplatescontent_list.tpl.php<\/p>\n<p>\u627e\u5230\uff1a<\/p>\n<pre>if($r['islink'])&nbsp;{\necho&nbsp;'';\n}&nbsp;elseif(strpos($r['url'],'http:\/\/')!==false)&nbsp;{\necho&nbsp;'';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u66ff\u6362\u4e3a\uff1a<\/p>\n<pre>if($r['islink'])&nbsp;{\necho&nbsp;'';\n}&nbsp;elseif(strpos($r['url'],'https:\/\/')!==false)&nbsp;{\necho&nbsp;'';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>3\u3001phpcmsmodulescontent emplatescontent_page.tpl.php<\/p>\n<p>\u627e\u5230\uff1a<\/p>\n<pre>if(strpos($category['url'],'http:\/\/')===false)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u66ff\u6362\u4e3a\uff1a<\/p>\n<pre>if(strpos($category['url'],'https:\/\/')===false)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u63a8\u8350\uff1a\u300a\u300b<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e0d\u652f\u6301https\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>phpcms\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5\uff1a\u9996\u5148\u627e\u5230\u201cglobal.func.php\u201d\u6587\u4ef6\uff1b\u7136\u540e\u4fee\u6539\u4ee3\u7801\u4e3a\u201c$url = str_replace(array(&#8216;https:\/\/&#8217;,&#8217;\/\/&#8217;,&#8217;~&#8217;)\u201d\uff1b\u6700\u540e\u4fee\u6539content_list\u6587\u4ef6\u5373\u53ef\u3002 Phpcms\u5347\u7ea7:\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5 Phpcms V9 \u5347\u7ea7\u4e0d\u652f\u6301https\u7684\u89e3\u51b3\u529e\u6cd5 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b 1\u3001libs unctionsglobal.func.php \u627e\u5230\uff1a $url&nbsp;=&nbsp;str_replace(array(&#8216;http:\/\/&#8217;,&#8217;\/\/&#8217;,&#8217;~&#8217;),&nbsp;array(&#8216;~&#8217;,&#8217;\/&#8217;,&#8217;http:\/\/&#8217;),&nbsp;$url); \u767b\u5f55\u540e\u590d\u5236 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u66ff\u6362\u4e3a\uff1a $url&nbsp;=&nbsp;str_replace(array(&#8216;https:\/\/&#8217;,&#8217;\/\/&#8217;,&#8217;~&#8217;),&nbsp;array(&#8216;~&#8217;,&#8217;\/&#8217;,&#8217;https:\/\/&#8217;),&nbsp;$url); \u767b\u5f55\u540e\u590d\u5236 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b 2\uff1aphpcmsmodulescontent emplatescontent_list.tpl.php \u627e\u5230\uff1a if($r[&#8216;islink&#8217;])&nbsp;{ echo&nbsp;&#8221;; }&nbsp;elseif(strpos($r[&#8216;url&#8217;],&#8217;http:\/\/&#8217;)!==false)&nbsp;{ echo&nbsp;&#8221;; \u767b\u5f55\u540e\u590d\u5236 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u66ff\u6362\u4e3a\uff1a if($r[&#8216;islink&#8217;])&nbsp;{ echo&nbsp;&#8221;; }&nbsp;elseif(strpos($r[&#8216;url&#8217;],&#8217;https:\/\/&#8217;)!==false)&nbsp;{ echo&nbsp;&#8221;; \u767b\u5f55\u540e\u590d\u5236 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b 3\u3001phpcmsmodulescontent emplatescontent_page.tpl.php \u627e\u5230\uff1a if(strpos($category[&#8216;url&#8217;],&#8217;http:\/\/&#8217;)===false) \u767b\u5f55\u540e\u590d\u5236 &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u66ff\u6362\u4e3a\uff1a if(strpos($category[&#8216;url&#8217;],&#8217;https:\/\/&#8217;)===false) \u767b\u5f55\u540e\u590d\u5236 \u63a8\u8350\uff1a\u300a\u300b \u4ee5\u4e0a\u5c31\u662f\u4e0d\u652f\u6301https\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-31643","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=31643"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31643\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}