Ethandvv Posted December 6, 2013 Share Posted December 6, 2013 (edited) <?php if(file_exists("log.html") && filesize("log.html") > 0){ $handle = fopen("log.html", "r"); $contents = fread($handle, filesize("log.html")); fclose($handle); echo $contents;}?></div> ===== I'm using PHP to create a chat, but i have encountered an error in which the ">" tag is causing the rest of the operation to be shown on the webpage. Any suggestions? (I have the part where the problem is occurring in bold and underlined. If you want me to post the main frame of this I can, just ask, I'm not sure if it's a file or just the script. Edited December 6, 2013 by Ethandvv Link to comment Share on other sites More sharing options...
Ethandvv Posted December 6, 2013 Author Share Posted December 6, 2013 (edited) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Chat - Customer Module</title> <link type="text/css" rel="stylesheet" href="style.css" /> </head> <body bgcolor="black"> <div id="wrapper"> <div id="menu"> <p class="welcome">Welcome, <b></b></p> <p class="logout"><a id="exit" href="logout.php">Exit Chat</a></p> <div style="clear:both"></div> </div> <div id="chatbox"> <?php if(file_exists("log.html") && filesize("log.html") > 0){ $handle = fopen("log.html", "r"); $contents = fread($handle, filesize("log.html")); fclose($handle); echo $contents;} ?> </div> <form name="message" action=""> <input name="usermsg" type="text" id="usermsg" size="63" /> <input name="submitmsg" type="submit" id="submitmsg" value="Send" /> </form> </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> // jQuery Document $(document).ready(function(){ }); </script> </body> </html> Here is the whole script set-out and i have CSS and JS plus some other PHP files linked in from an external folder Edited December 6, 2013 by Ethandvv Link to comment Share on other sites More sharing options...
justsomeguy Posted December 6, 2013 Share Posted December 6, 2013 A > character does not end PHP code. It sounds like your server is not executing PHP at all. Maybe it isn't installed, or maybe the file isn't a PHP file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now