Nge- AMP ye-plugin ye-PHP unokwenza ngokulula, ngokuzenzekelayo, wenze amaphepha e-Google AMP kwiiwebhusayithi zakho.
Lungiselela iwebhusayithi yakho ye-PHP yezixhobo eziphathwayo kunye neGoogle Isalathiso sokuqala seFowuni ngaphandle kokudwelisa eyakho inguqulelo yeAMPHTML kwiphepha ngalinye lakho!
Vavanya ngaphandle: Faka. Yenza kusebenze. Igqitywe tu!
Ingcebiso ngaphambi kokuba uqale ukufaka i-plug-in ye-PHP-AMP: Kwezinye izisombululo ze-CMS, amp-cloud.de ibonelela nge-plug-ins ezikhethekileyo zeGoogle AMP ekulula nokufaka kunye nokulawula! Njengenye indlela eya kwi "AMP ye-plug-in ye-PHP" , enye yezi zilandelayo plug-ins zikaGoogle AMP inokuba ngumdla kuwe:
Khuphela uguqulelo lwangoku lwe "AMP ye-PHP Plugin" njengefayile ye-ZIP kule khonkco ilandelayo yokukhuphela. -Ifayile ye-ZIP inefowulda ebizwa ngokuba yi "amp" equle zonke iifayile ezifunekayo ukufaka kunye nokusebenzisa i-plug-in ye-AMP
Unzip / khupha ifayile ye-ZIP ekhutshelweyo.
Faka ifolda engavulelwanga enegama "/ amp /" kulawulo lweengcambu lwewebhu yakho ukuze ifolda ifikelele kwiwebhusayithi yakho phantsi kwale URL ilandelayo:
Ukuvavanya ukuba ifolda igcinwe ngokuchanekileyo na kwiseva yakho yewebhu, biza nje i-URL elandelayo- Ukuba ufakelo luchanekile, kuya kufuneka ubone umyalezo okuxelela ukuba iwebhusayithi yakho isebenzisa i-plug-in ye-AMP ukusuka amp-cloud.de, Ngaphandle koko iplagi ayifakwanga ngokuchanekileyo kwaye kuya kufuneka uphinde ulandele la manyathelo angentla:
Okokugqibela, kubandakanya ukutyhala isiseko ngasinye , ofuna ukusinika uguqulelo lwe-AMP, usebenzisa enye yezi zinto zilandelayo <link rel = "amphtml"> - usuku kwi <head> icandelo lesiseko esihambelanayo.
<link rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= inqaku lakho URL" />
<link rel="amphtml" href=" http:// ".$_SERVER['HTTP_HOST']."/amp/amp.php?url=".urlencode(" http:// ".$_SERVER['HTTP_HOST '].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."")."" />
<?php echo " <!DOCTYPE html> <html> <head> <title> Isihloko sakho se 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> Ikhowudi yakho yomthombo womzimba ... </body> </html> ;" ?>
I-AMP esemthethweni ye-plugin ye-PHP evela ku-amp-cloud.de isebenze amaPhepha eeMfono eziKhawulezileyo (i-AMP) kwiiwebhusayithi zakho ze-PHP, ngokuthe ngqo phantsi komgcini wakho, njengoko kucetyiswa sisikhokelo se-AMP sikaGoogle!