Ma te mono AMP mo PHP ka taea e koe te hanga i nga wharangi AMP Google mo o paetukutuku.
Arotakehia to paetukutuku PHP mo nga taputapu waea me te Tiwhikete Tuatahi Tuatahi a Google me te kore e whakamahere i to ake putanga AMPHTML mo ia whaarangi!
Whakamatauhia: Whakauruhia. Whakahohe. Kua Oti!
He tohu i mua i to tiimata ki te whakauru i te taapiri whakauru PHP-AMP: Mo etahi whakataunga CMS, amp-cloud.de he tuku i nga taapiri Google AMP motuhake he maamaa ake ki te whakauru me te whakahaere! - Hei whakakapi mo te "AMP mo te mono-mai PHP" , ko tetahi o nga mono-mai a Google AMP e whai ake nei ka pai ki a koe:
Tangohia te putanga "AMP mo te Mono PHP" inaianei hei konae ZIP mai i te hononga tango e whai ake nei. - Kei roto i te konae ZIP tetahi kōpaki e kiia ana ko "amp" kei roto katoa nga konae hei whakauru me te whakamahi i te taapiri-a AMP.
Wewetehia / tangohia te konae ZIP kua tangohia.
Tukuna te kopae kua korehia me te ingoa "/ amp /" ki te raarangi pakiaka o to kaituku paetukutuku kia tae atu ai te kōpaki ki to paetukutuku i raro i te URL e whai ake nei:
Hei whakamatautau he tika te penapena o te kopaki i runga i to kaituku paetukutuku, karanga noa i te URL e whai ake nei - Mena he tika te whakauru, me kite koe i tetahi korero e kii atu ana ka whakamahia e to paetukutuku te whakauru-AMP mai i amp-cloud.de, ki te kore e tika te whakauru o te monomai ana me haere ano koe ki nga huarahi i runga ake nei:
I te mutunga, whakauruhia te akiaki i ia turanga, e hiahia ana koe ki te whakarato i te putanga AMP, ma te whakamahi i tetahi o nga momo e whai ake nei he <link rel = "amphtml"> - he ra i te waahanga <head> o te turanga e hangai ana.
<link rel = "amphtml" href = "http: // www.DeineDomain.de /amp/amp.php?url= IhrArtikelURL " />
<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> To taitara 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> Ko to waehere tinana... </body> </html> ;" ?>
Ko te AMP mana mo te monomai PHP mai i te amp-cloud.de ka whakahohe i nga Wharangi Waea Whakatere (AMP) i runga i o paetukutuku PHP, kei raro i to kaihautu, pera me nga tohutohu a te kaihauturu AMP a Google!