Jump to content

Recommended Posts

I am getting nothing to the screen with this page.

 

<?PHP
ini_set ("display_errors", "1");
error_reporting(E_ALL);

function  hello_test($text){
if ($text = 'hello'){
        echo $text;

}else{
      hello_test('hello');

}

hello_test('goodbye');

echo "not working";
?>

You never closed your function...  With proper indentation this could have been easily detected.

 

Try this:

 

ini_set("display_errors", "1");
error_reporting(E_ALL);

function  hello_test($text){
   if ($text == 'hello'){
      echo $text;
   } else {
      hello_test('hello');
   }
}

hello_test('goodbye');

?>

 

EDIT: You know this will always echo "hello", right?

thanks I will pay  more attention to the indentation.

 

yes I know. I am jsut try to test something. I hav an issue with my other script that calls a funtion with in a function. I am not getting any errors but I am not seeing the result I want.

 


if (strpos($fp,"Redirected")){
  									
                       if(strpos($fp,"whois.ripe.net")){

		$whois_ip_servernew = 'whois.ripe.net';
               		 whois_ip($whois_ip_servernew, '-1', 'FALSE', $visitor_ip);
              								 
                       }else{
		return $fp;
                       }
             
  }else{
  return $fp; 
  }

Same problem as before...

 

Try:

 

if (strpos($fp,"Redirected")){
   if(strpos($fp,"whois.ripe.net")){
      $whois_ip_servernew = 'whois.ripe.net';
      whois_ip($whois_ip_servernew, '-1', 'FALSE', $visitor_ip);                                
   } else {
      return $fp;       
   } 
} else {
   return $fp;
}

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.