webi Posted October 22, 2010 Report Share Posted October 22, 2010 Sveiki, Kas varētu būt nepareizi servera konfigurācijā vai kur citur, ja PHP funkcija file_get_contents() strādā tikai ar IP adresi, bet ar domeinu nē? piemēram - file_get_contents('http://212.93.96.97') strādā, bet file_get_contents('http://php.lv') Nē. serveris - Windows 7, Apache 2.2.11, PHP 5.2.11 p.s. Serverī interneta pārlūkā tā pati problēma. Quote Link to comment Share on other sites More sharing options...
webi Posted October 22, 2010 Author Report Share Posted October 22, 2010 Šodien veiksmīga diena pēc iepostošanas forumā pats iedomājos to, ko nevarēju iedomāties nedēļu. :D pieliku windows hosts failā rindiņu 212.93.96.97 php.lv un aizgāja. Quote Link to comment Share on other sites More sharing options...
marrtins Posted October 22, 2010 Report Share Posted October 22, 2010 DNS tev vispār tur strādā? ping google.com? Quote Link to comment Share on other sites More sharing options...
euphoric Posted October 22, 2010 Report Share Posted October 22, 2010 Kaut kas nav ar DNS. Statiski, katru vietni rakstīt hosts failā, nav normāli (giggle) Quote Link to comment Share on other sites More sharing options...
Леший Posted October 22, 2010 Report Share Posted October 22, 2010 file_get_contents('php.lv') Noradot domeina vārdu bez http://, vajadzētu strādāt Quote Link to comment Share on other sites More sharing options...
marrtins Posted October 22, 2010 Report Share Posted October 22, 2010 ^ hehe, jā, ja tekošajā folderī ir fails php.lv :D Quote Link to comment Share on other sites More sharing options...
Леший Posted October 22, 2010 Report Share Posted October 22, 2010 tpu, sajaucu ar fsockopen() :D 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.