Jump to content

check


hackalive

Recommended Posts

mikesta707 thankyou for your help  but

	$PhpTagCheck = '<PHP>';
$PhpTagCheck = strpos($contents, $PhpTagCheck);
if($PhpTagCheck === true){
	header("location: http://www.google.com");
} else {
	header("location: http://www.phpfreaks.com");
               //NOT WORK
}

 

its still not working

Link to comment
https://forums.phpfreaks.com/topic/197390-check/#findComment-1036036
Share on other sites

oh, sorry try

if($PhpTagCheck !== false){

 

apparently it has trouble with ===

 

the followign works for me

$contents = "some string with <PHPdd> in it";
$PhpTagCheck = '<PHP>';
$PhpTagCheck = strpos($contents, $PhpTagCheck);
if($PhpTagCheck !== false ){
	echo "good";
	//header("location: http://www.google.com");
} else {
	//return "It dosn't work";
	echo "bad";
}

Link to comment
https://forums.phpfreaks.com/topic/197390-check/#findComment-1036039
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.