Hamwe na AMP ya plugin ya PHP urashobora byoroshye, byimazeyo, gukora page ya Google AMP kurubuga rwawe.
Hindura urubuga rwa PHP kubikoresho bigendanwa hamwe na Google Yambere Yambere ya Google utiriwe ukora progaramu yawe ya AMPHTML kuri buri paji yawe!
Gerageza: Shyira. Kora. Byarangiye!
Inama mbere yuko utangira kwinjizamo plug-in ya PHP-AMP: Kubisubizo bimwe na bimwe bya CMS, amp-cloud.de itanga amacomeka yihariye ya Google AMP ndetse byoroshye kuyashiraho no kuyacunga! - Nkubundi buryo bwa "AMP kuri plug-in ya PHP" , imwe muma plug-ins ya Google AMP ikurikira irashobora kugushimisha:
Kuramo verisiyo ya "AMP ya PHP Plugin" nka dosiye ya ZIP uhereye kumurongo ukurikira. - Idosiye ya ZIP irimo ububiko bwitwa "amp" bukubiyemo dosiye zose zisabwa kugirango ushyire kandi ukoreshe AMP plug-in.
Kuramo / gukuramo dosiye ZIP yakuweho.
Kuramo ububiko butabitswe hamwe nizina "/ amp /" mububiko bwumuzi wa seriveri yawe kugirango ububiko bugere kurubuga rwawe munsi ya URL ikurikira:
Kugirango umenye niba ububiko bwabitswe neza kurubuga rwawe, hamagara gusa URL ikurikira - Niba iyinjizamo ari ryiza, ugomba kubona ubutumwa bukubwira ko urubuga rwawe rukoresha AMP icomeka kuri amp-cloud.de, bitabaye ibyo plugin ntabwo yashyizweho neza kandi ugomba kongera kunyura murwego rwo hejuru:
Ubwanyuma, shyiramo gusunika buri shingiro, kubyo ushaka gutanga verisiyo ya AMP, ukoresheje imwe muburyo bukurikira a <link rel = "amphtml"> - umunsi mugice cya <head> igice cyibanze .
<ihuza rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
<ihuza rel = "amphtml" href = " http: // ". $ _ UMUKOZI ['HTTP_HOST']. "/ amp / amp.php? url =". urlencode (" http: // ". ']. $ _ UMUKORESHE [' PHP_SELF ']. "?". $ _ UMUKOROZI
<?php echo " <!DOCTYPE html> <html> <head> <title> Umutwe wawe wa 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> Kode yumubiri wawe ... </body> </html> ;" ?>
AMP yemewe ya plugin ya PHP kuva amp-cloud.de ikora page yihuta ya paji igendanwa (AMP) kurubuga rwawe bwite rwa PHP, munsi yuwakiriye, nkuko byasabwe nubuyobozi bwa Google AMP!