PHP AMP-Plugin - Download & Anleitung

Pẹlu AMP fun ohun itanna PHP o le ni irọrun, ni adaṣe laifọwọyi, ṣẹda awọn oju-iwe AMP Google fun awọn oju opo wẹẹbu rẹ.

Je ki oju opo wẹẹbu PHP rẹ pọ si fun awọn ẹrọ alagbeka ati Atọka Akọkọ Google Mobile laisi nini lati ṣe eto ẹya AMPHflix tirẹ fun oju-iwe rẹ kọọkan!

Ṣe idanwo rẹ: Fi sii. Mu ṣiṣẹ. Ti pari!


Ipolowo

Fi ohun itanna AMP PHP sii


description

Imọran ṣaaju ki o to bẹrẹ fifi sori ẹrọ PHP-AMP plug-in: Fun diẹ ninu awọn solusan CMS, amp-cloud.de nfunni ni awọn afikun plug-in AMP Google pataki paapaa rọrun lati fi sii ati ṣakoso! -Gẹgẹbi omiiran si “AMP fun plug-in PHP” , ọkan ninu awọn afikun AMP Google atẹle wọnyi le jẹ anfani si ọ:


Schritt-1: Download "AMP für PHP Plugin"

Ṣe igbasilẹ ẹya "AMP fun Ẹrọ itanna PHP" lọwọlọwọ bi faili ZIP kan lati ọna asopọ igbasilẹ atẹle. - Faili ZIP naa ni folda ti a pe ni "amp" eyiti o ni gbogbo awọn faili ti o nilo lati fi sori ẹrọ ati lo ifibọ AMP sii.


Igbesẹ-2: Jade “AMP fun Ohun itanna PHP” -ZIP-faili

Unzip / jade faili ZIP ti o gbasilẹ.

  • Lẹhin ti ṣiṣi / jade o yẹ ki o ni bayi ni “folda” pẹlu orukọ “/ amp /“ ninu eyiti awọn faili ohun itanna PHP-AMP wa.

Igbesẹ-3: Fipamọ awọn faili ohun itanna PHP lori olupin ayelujara

Ṣe igbasilẹ folda ti a ko ṣii pẹlu orukọ "/ amp /" sinu itọsọna gbongbo ti olupin wẹẹbu rẹ ki folda naa le de lori oju opo wẹẹbu rẹ labẹ URL atẹle:

  • www.DeineDomain.de/amp/

Lati ṣe idanwo boya folda ti wa ni fipamọ daradara lori olupin ayelujara rẹ, pe ni URL ti o tẹle - Ti fifi sori ẹrọ ba tọ, o yẹ ki o wo ifiranṣẹ kan ti o sọ fun ọ pe oju opo wẹẹbu rẹ nlo amuludun AMP lati amp-cloud.de , bibẹkọ ti a ko fi ohun itanna sii daradara ati pe o yẹ ki o lọ nipasẹ awọn igbesẹ loke lẹẹkansi:

  • www.DeineDomain.de/amp/amp.php
    (Dajudaju o ni lati rọpo www.yourdomain.de pẹlu adirẹsi ti oju opo wẹẹbu rẹ)

Igbesẹ-4: fi aami AMPHTML sii!

Ni ikẹhin, pẹlu titari ipilẹ kọọkan , fun eyiti o fẹ lati pese ẹya AMP, ni lilo ọkan ninu awọn abawọn atẹle <ọna asopọ rel = "amphtml"> - ọjọ kan ni apakan <ori> ti ipilẹ to baamu.

  • Ẹya 1:

    <ọna asopọ rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
    • Rọpo apakan "http: //" pẹlu "https: //" ti o ba nlo HTTPS lori oju opo wẹẹbu rẹ
    • Rọpo apakan “www.yourdomain.de” pẹlu aaye ti oju opo wẹẹbu rẹ
    • Ersetze den Teil "DeineArtikelURL" durch eine UTF8 encodierte URL der jeweiligen Unterseite auf der du den AMPHTML-Tag einbaust (inkl. "http://" bzw. "https://")

      Lati ṣafikun URL kan ni deede, o le lo koodu iwọle URL ori ayelujara atẹle, fun apẹẹrẹ: https://www.url-encode-online.rocks/

      Apẹẹrẹ fun URL ti a fi koodu si UTF-8:
      https% 3A% 2F% 2Fwww.DeineDomain.de% 2FDeinPfad% 2FDeineDatei.php% 3Fparameter% 3DS% C3% BC% C3% 9F% 26sprache% 3DDE

      Apẹẹrẹ fun URL ti a pinnu URL UTF-8:
      https://www.DeineDomain.de/DeinPfad/DeineDatei.php?parameter=Süß&sprache=DE

  • Iyatọ 2:

    <ọna asopọ rel = "amphtml" href = " http: // ". $ _ SERVER ['HTTP_HOST']. "/ amp / amp.php? url =". urlencode (" http: // ". $ _ SERVER [ 'HTTP_HOST']. $ _ Olupin ['PHP_SELF']. "?". $ _ SERVER ['QUERY_STRING']. ""). "" />
    • Ti o ba lo HTTPS lori oju opo wẹẹbu rẹ, rọpo awọn ẹya meji "http: //" pẹlu "https: //"

AMP PHP-Code Beispiel


code
<?php echo " <!DOCTYPE html> <html> <head> <title> Akọle meta rẹ ... </title> <link rel="amphtml" href="https://".$_SERVER['HTTP_HOST']."/amp/amp.php?url=".urlencode("https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."")."" /> </head> <body> Koodu orisun ara re ... </body> </html> ;" ?>

Kini idi ti o lo ohun itanna PHP AMP?


power

AMP osise fun ohun itanna PHP lati amp-cloud.de n mu Awọn oju-iwe Alailowaya Alailowaya (AMP) ṣiṣẹ lori awọn oju opo wẹẹbu PHP tirẹ, taara labẹ agbalejo tirẹ, bi iṣeduro nipasẹ awọn itọsọna alejo AMP ti Google!


Ipolowo