Phallo ea PHP ea AMP - Khoasolla & Litaelo

Ka plugin ea AMP bakeng sa PHP u ka iketsetsa habonolo feela maqephe a Google AMP bakeng sa libaka tsa hau tsa marang-rang.

Lokisetsa sebaka sa hau sa marang-rang sa PHP bakeng sa lisebelisoa tsa mehala le Google Mobile First Index ntle le hore u hlophise mofuta oa hau oa AMPHTML leqepheng le leng le le leng la hau!

E leke: Kenya. Sebelisa. Feletseng!


Phatlalatso

AMP-PHP-Plugin installieren


description

Keletso pele o qala ho kenya plug-in ea PHP-AMP: Bakeng sa litharollo tsa CMS, amp-cloud.de e fana ka li-plug-ins tse khethehileng tsa Google AMP tse bonolo le ho feta ho li kenya le ho li tsamaisa! E le mokhoa o mong oa "AMP for PHP plug-in" , e 'ngoe ea li-plug-ins tse latelang tsa Google AMP e ka u khahla:


Mohato oa 1: Khoasolla "AMP bakeng sa Phallo ea PHP"

Khoasolla mofuta oa hajoale oa "AMP for PHP Plugin" joalo ka faele ea ZIP ho tsoa sehokelong se latelang sa download. - Faele ea ZIP e na le foldara e bitsoang "amp" e nang le lifaele tsohle tse hlokahalang ho kenya le ho sebelisa plug-in ea AMP.


Mohato oa 2: Tlosa "AMP bakeng sa Phallo ea PHP" -ZIP-file

Unzip / ntša file ea ZIP e jarollotsoeng.

  • Kamora ho hlakola / ho ntša joale o lokela ho ba le "foldara" e nang le lebitso "/ amp /" moo lifaele tsa plug-in tsa PHP-AMP li leng teng.

Mohato oa 3: Boloka lifaele tsa plugin tsa PHP ho seva ea webo

Kenya foldara e sa koalolloang ka lebitso "/ amp /" ka har'a sesebelisoa sa hau sa marang-rang e le hore foldara e ka fihlelleha webosaeteng ea hau tlasa URL e latelang:

  • www.DeineDomain.de/amp/

Ho lekola hore na foldara e bolokiloe ka nepo ho seva sa hau sa webo, letsetsa URL e latelang feela - Haeba ho hlongoa ho nepahetse, o lokela ho bona molaetsa o u joetsang hore sebaka sa hau sa marang-rang se sebelisa plug-in ea AMP ho tsoa amp-cloud.de, ho seng joalo, plugin ha ea kenngwa ka nepo mme o lokela ho feta mehatong e kaholimo hape:

  • www.DeineDomain.de/amp/amp.php
    (Ehlile u tlameha ho nka sebaka sa www.yourdomain.de ka aterese ea sebaka sa hau sa marang-rang)

Mohato oa 4: kenya tag ea AMPHTML!

Qetellong, kenyelletsa ho sutumetsa setsi se seng le se seng, seo u batlang ho fana ka mofuta oa AMP ka sona, u sebelisa e 'ngoe ea mefuta e latelang <link rel = "amphtml"> - letsatsi karolong ea <head> ea setsi se tsamaellanang.

  • Mofuta oa 1:

    <link rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
    • Tlosa karolo ea "http: //" ka "https: //" haeba u sebelisa HTTPS webosaeteng ea hau
    • Tlosa karolo ea "www.yourdomain.de" ka sebaka sa sebaka sa hau sa marang-rang
    • Tlosa karolo "URL ea hau ea Sengoloa" ka URL e kentsoeng ea UTF8 ea leqephe le latelang leo u kenyelitseng tag ea AMPHTML ho lona "Http: //" kapa "https: //")

      Ho khouta URL ka nepo, o ka sebelisa sesebelisoa sa URL sa inthanete sa mahala mahala, ka mohlala: https://www.url-encode-online.rocks/

      Mohlala oa URL e kentsoeng ka UTF-8:
      https% 3A% 2F% 2Fwww.DeineDomain.de% 2FDeinPfad% 2FDeineDatei.php% 3Fparameter% 3DS% C3% BC% C3% 9F% 26sprache% 3DDE

      Mohlala oa URL e khethiloeng ea UTF-8:
      https://www.DeineDomain.de/DeinPfad/DeineDatei.php?parameter=Süß&sprache=DE

  • Mofuta oa 2:

    <link rel = "amphtml" href = " http: // ". $ _ SERVER ['HTTP_HOST']. "/ amp / amp.php? url =". urlencode (" http: // ". $ _ SERVER [ 'HTTP_HOST']. $ _ SERVER ['PHP_SELF']. "?". $ _ SERVER ['QUERY_STRING']. ""). "" />
    • Haeba u sebelisa HTTPS webosaeteng ea hau, beha likarolo tse peli "http: //" sebakeng sa "https: //"

Mohlala oa khoutu ea AMP PHP


code
<?php echo " <!DOCTYPE html> <html> <head> <title> Sehlooho sa hau sa meta ... </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> Khoutu ea mohloli oa 'mele oa hau ... </body> </html> ;" ?>

Hobaneng ha o sebelisa plugin ea AMP PHP?


power

AMP ea semmuso ea plugin ea PHP e tsoang amp-cloud.de e kenya Accelerated Mobile Pages (AMP) ho liwebosaete tsa hau tsa PHP, ka kotloloho tlasa moamoheli oa hau, joalo ka ha ho khothalelitsoe ke litataiso tsa moamoheli oa Google AMP!


Phatlalatso