TJMAudio Posted December 14, 2006 Share Posted December 14, 2006 This is not the first time this has happened. My actual code is being displayed on a white page...www.shleem.com/stuff/Here is the code:[code]<?$url = @fsockopen("big.oscar.aol.com", 80, &$errno, &$errstr, 3);fputs($url, "GET /spoonosupport?on_url=online&off_url=offline HTTP/1.0\n\n");while(!feof($url)){ $feofi++; $page .= fread($url,256); if($feofi > 10) { $page = "offline"; break; }}fclose($url);if(strstr($page, "online")){ echo "the user is online";}else{ echo "the user is offline";}?>[/code] Link to comment https://forums.phpfreaks.com/topic/30686-my-php-is-being-displayed-on-the-page/ Share on other sites More sharing options...
hitman6003 Posted December 14, 2006 Share Posted December 14, 2006 Use the full php opening tag... "<?php" not "<?".If it still doesn't work, check to make sure your server has php enabled / installed. Link to comment https://forums.phpfreaks.com/topic/30686-my-php-is-being-displayed-on-the-page/#findComment-141395 Share on other sites More sharing options...
doni49 Posted December 15, 2006 Share Posted December 15, 2006 And make sure the code is in a file that is handled by the PHP engine.One of the most common things I've seen when people make such complaints is that they had the code in a file with an HTML extension. Link to comment https://forums.phpfreaks.com/topic/30686-my-php-is-being-displayed-on-the-page/#findComment-141551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.