HTML can be embedded within PHP code. If you have an HTML page with php code contained within it, always (well, usually) use .php as the extension.
The .php extension is recognized by the web server and the code is sent off to the PHP program to be parsed and HTML returned.
So make sure that all of the pages where you are using PHP code within them must have the .php file extension.
How do you know they are not updating the log file? After loading the page.. do you download/view the NEW log file from your server?
I am thinking that you don't have sufficient permissions to update the file contents, if this is not the case. Try running this small piece of code within a .php extension file
Code: Select all
<?php
echo '<pre>';
var_dump($a = is_writable($_SERVER['DOCUMENT_ROOT'] . '/iplog.txt'));
echo '</pre>';
If the above prints true, then that means that you can indeed write to the file.
If it prints false, then you do not have sufficient permissions on the file to write to it.
Also, if you are copying code from this forum, # marks will appear in front of each line of code, such as
# line 1
# line 2
# line 3
Make sure you remove those # signs from the beginning of the code you copied.
And finally, when you're getting a blank white web page.. make sure it's truly nothing there. Right click inside the web page and go to 'view source' from the menu. See what's there.
