Plugin PHP AMP - Saukewa & Umarni

Tare da AMP don kayan aikin PHP zaka iya sauƙi, gaba ɗaya ta atomatik, ƙirƙirar shafukan Google AMP don rukunin yanar gizonku.

Inganta gidan yanar gizonku na PHP don na'urorin hannu da kuma Google Mobile Fihirisar Farko ba tare da shirya naku AMPHflix version ga kowane shafinku ba!

Gwada shi: Shigar. Kunna. An gama!


Talla

Shigar da kayan aikin AMP PHP


description

Nasihu kafin fara shigar da plug-in PHP-AMP: Don wasu mafita na CMS, amp-cloud.de yana ba da plug-ins na musamman na AMP na Google wanda har ma ya fi sauƙi don shigarwa da sarrafawa! -A matsayin madadin "AMP don plug-in PHP" , ɗayan plug-ins na AMP na Google na iya zama abin sha'awa a gare ku:


Mataki-1: Zazzage "AMP don Plugin PHP"

Zazzage nau'in "AMP don PHP Plugin" na yanzu azaman fayil ɗin ZIP daga mahadar saukarwa mai zuwa. - Fayil din ZIP na dauke da wani folda da ake kira "amp" wanda ya kunshi duk fayilolin da ake buƙata don girkawa da amfani da toshe AMP.


Mataki-2: Cire "AMP don PHP Plugin" -ZIP-fayil

Cire / cire fayil ɗin ZIP da aka sauke.

  • Bayan cirewa / cirewa yakamata yanzu ku sami "babban fayil" tare da suna " / amp /" inda fayilolin plug-in na PHP-AMP suke.

Mataki-3: Ajiye fayilolin plugin na PHP akan sabar yanar gizo

Sanya babban fayil ɗin da ba a buɗe ba tare da suna " / amp /" a cikin tushen tushen sabar gidan yanar gizon ku don a iya isa ga babban fayil ɗin akan gidan yanar gizon ku ƙarƙashin URL mai zuwa:

  • www.DeineDomain.de/amp/

Don gwada ko an adana babban fayil ɗin a kan sabar yanar gizonku, kawai kira adireshin da ke biye - Idan shigarwar daidai ne, ya kamata ku ga saƙo wanda zai gaya muku cewa rukunin yanar gizonku yana amfani da AMP toshe daga amp-cloud.de, in ba haka ba an shigar da plugin ɗin daidai kuma ya kamata ku sake bi ta matakan da ke sama:

  • www.DeineDomain.de/amp/amp.php
    (Tabbas dole ne ku maye gurbin www.yourdomain.de tare da adireshin gidan yanar gizon ku)

Mataki-4: saka alamar AMPHflix!

A ƙarshe, haɗa da tura kowane tushe, wanda kake son samar da sigar AMP, ta amfani da ɗayan ɗayan bambance-bambancen masu biyowa a '' link rel = "amphtml"> - yini a cikin sashin <kai> na tushen da ya dace.

  • Sigogi 1:

    <link rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
    • Maye gurbin "http: //" da "https: //" idan kuna amfani da HTTPS akan gidan yanar gizonku
    • Sauya sashin "www.yourdomain.de" tare da yankin gidan yanar gizon ku
    • Sauya sashin "URL ɗinku na Labarai" tare da URL mai lamba UTF8 na ƙaramin shafi wanda kuka haɗa da alamar AMPHTML (ciki har da "Http: //" ko "https: //")

      Don sanya adireshin URL yadda ya dace, zaku iya amfani da mai ba da adireshin URL na kan layi kyauta, misali: https://www.url-encode-online.rocks/

      Misali don UTF-8 keɓaɓɓen URL:
      https% 3A% 2F% 2Fwww.DeineDomain.de% 2FDeinPfad% 2FDeineDatei.php% 3Fparameter% 3DS% C3% BC% C3% 9F% 26sprache% 3DDE

      Misali na UTF-8 wanda aka ƙaddara URL:
      https://www.DeineDomain.de/DeinPfad/DeineDatei.php?parameter=Süß&sprache=DE

  • Bambanci 2:

    <link rel="amphtml" href=" http:// ".$_SERVER['HTTP_HOST']."/amp/amp.php?url=".urlencode(" http:// ".$_SERVER['HTTP_HOST'] '].$_SERVER['PHP_SELF']"?".$_SERVER['QUERY_STRING']."")."" />
    • Idan kayi amfani da HTTPS akan gidan yanar gizon ka, maye gurbin sassan biyu "http: //" da "https: //"

Misali lambar lambar AMP PHP


code
<?php echo " <!DOCTYPE html> <html> <head> <title> Taken 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> Lambar asalin jikin ku ... </body> </html> ;" ?>

Me yasa ake amfani da AMP PHP plugin?


power

AMP na hukuma don tallata PHP daga amp-cloud.de tana kunna Saukakakkun Shafukan Wayar Salula (AMP) akan rukunin yanar gizonku na PHP, kai tsaye ƙarƙashin mai gidanku, kamar yadda shawarwarin rundunar AMP na Google suka bada shawara!


Talla