Blumish Posted October 4, 2013 Report Share Posted October 4, 2013 Facebook "Like" pogai šāds errors: The href URL must be absolute Un lūk ir tas kas to izraisa: <?php echo $domain.$path; ?> Kā to pārveidot par "absolute URL" ? Paldies! Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 4, 2013 Report Share Posted October 4, 2013 (edited) $domain vajadzētu saturēt to, kas padara URLi par absolūtu... Jāpēta, kāpēc tā nav. $domain = '//facebook.com' $path = '/path/to/whatever/' Edited October 4, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
daGrevis Posted October 4, 2013 Report Share Posted October 4, 2013 Paredzu jautājumus par to, kas ir // un vai to vajag lietot. Re kur ir izskaidrojums. http://stackoverflow.com/questions/4659345/is-there-any-downside-for-using-a-leading-double-slash-to-inherit-the-protocol-i Quote Link to comment Share on other sites More sharing options...
Blumish Posted October 4, 2013 Author Report Share Posted October 4, 2013 Man ir šādi: $domain = $_SERVER['HTTP_HOST']; $path = $_SERVER['REQUEST_URI']; Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 4, 2013 Report Share Posted October 4, 2013 (edited) Izdrukā, paskaties, kas tajā URLī ir. Ja šis URLis tiek izmantots citā lapā, tad tam obligāti jāsatur protokolu, tātad URLim būtu jāizskatās aptuveni šādi: http://domain.tld/path/to/whatever/Vēl jautājums, kur tu redzi to erroru "The href URL must be absolute"? Edited October 4, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
Sasa Posted October 4, 2013 Report Share Posted October 4, 2013 Aizdomas tajā ka $domain ir bez protokola un priekš FB Like pogas labāk uzlikt lai ir HTTP jo ja lēkās no HTTP uz HTTPS tad laiki skaitīsies atsevišķi, jo tie būs divi dažādi URL'i Quote Link to comment Share on other sites More sharing options...
ysakovs Posted October 4, 2013 Report Share Posted October 4, 2013 Izdrukā, paskaties, kas tajā URLī ir. Ja šis URLis tiek izmantots citā lapā, tad tam obligāti jāsatur protokolu, tātad URLim būtu jāizskatās aptuveni šādi: http://domain.tld/path/to/whatever/Vēl jautājums, kur tu redzi to erroru "The href URL must be absolute"? Lūk tas errors: Uzspiežot uz viņa uznirst jauns logs ar iepriekš minēto tekstu. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted October 4, 2013 Report Share Posted October 4, 2013 Protokolu ar hostu pieraksti šādi -> //php.lv - šajā gadījumā hosts būs tāds, ar kādu ir atvērta lapa un nevajadzēs zīlēt vai likt http vai https Quote Link to comment Share on other sites More sharing options...
ysakovs Posted October 4, 2013 Report Share Posted October 4, 2013 Protokolu ar hostu pieraksti šādi -> //php.lv - šajā gadījumā hosts būs tāds, ar kādu ir atvērta lapa un nevajadzēs zīlēt vai likt http vai https Nu es liku šādi: $domain = $_SERVER['//HTTP_HOST']; bet nekas nenotika Quote Link to comment Share on other sites More sharing options...
Sasa Posted October 4, 2013 Report Share Posted October 4, 2013 piemauc beigās index.php kas zin varbūt aizies. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted October 4, 2013 Report Share Posted October 4, 2013 (edited) Nu es liku šādi: $domain = $_SERVER['//HTTP_HOST']; bet nekas nenotika Vot ļepītāji! Kur tu ieliki tās slīpsvītras?! :D $domain = '//'.$_SERVER['HTTP_HOST']; Edited October 4, 2013 by Kasspars Quote Link to comment Share on other sites More sharing options...
ysakovs Posted October 4, 2013 Report Share Posted October 4, 2013 Vot ļepītāji! Kur tu ieliki tās slīpsvītras?! :D $domain = '//'.$_SERVER['HTTP_HOST']; hmm tagad viņš čīkst pat kaut kādu: Invalid HREF Parameter Quote Link to comment Share on other sites More sharing options...
jurchiks Posted October 4, 2013 Report Share Posted October 4, 2013 (edited) Kāds ir tas reālais gala URLis? Vari kaut vai error logā ielogot? Edited October 4, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.