Jump to content
php.lv forumi

file_get_contents() errors


sidrs

Recommended Posts

Lieta sekojoša uz pc strādā koda gabals, ka uzlieku uz hosta serveri ta šis errors izmetās x reizes:

 

Warning: file_get_contents() expects at most 2 parameters, 5 given in /usr/home/....php on line 41

 

cik noprotu jāregulē php konfigurācija?

Link to comment
Share on other sites

hostingam ir Php 4.4.9 versija.

Pie php.ini nav access. Ja vajag ko nomainit tad jasazinas ar hosteriem pašiem.

Ka es varu parbaudit php konfigurāciju vismaz vizuāli :D ?

 

 

 

function check_result($code) {  	
global $prices, $ntp_user_id;  	
foreach($prices as $i => $key){  		
$answer = file_get_contents("http://sms.techpoint.lv/confirm.php?code=$code&id=$ntp_user_id&price=$key", FALSE, NULL, 0, 140);  		
if ($answer == 'key_ok') {  			
return $key;  		
}  	
}  
}

Edited by sidrs
Link to comment
Share on other sites

Uz php 4.x file_get_contents() funkcijai bija tikai 2vi parametri.

 

Ja tavs hostings joprojam tup uz 4.x versijas, tad maini hostingu.

Tas nozīmē, ka pēdējo reizi viņī serveri konfigurējuši 2007ajā,

jo tad tika pārtraukts php 4.x supports.

 

Šobrīd vienīgā support'ētā php versija ir 5.3.x

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...