Support Forums

Full Version: Ban Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
From the script you gave me just now.

There is 2 127.0.0.1 IP addresses print out on the screen.

Therefore,I guess there is nothing wrong with the script.
(10-21-2009, 10:33 AM)ethical_john Wrote: [ -> ]From the script you gave me just now.
There is 2 127.0.0.1 IP addresses print out on the screen.
Therefore,I guess there is nothing wrong with the script.

I'm sorry but that goes out of my knowledge.
Looks like you have some problems with your Local Server, with the script is nothing wrong....
Like I said try installing WAMP and test it again, if it's the same result, I will probably go and kill my self.... ahhhh I don't know sorry!

edit: before installing WAMP uninstall XAMPP.
I have solve the problem.

This is the script I have posted at first:

Quote:<html>
<body>

<?php
include("bans.php");
?>

<p>
Welcome People !
</p>
</body>
</html>

What I do is :

Quote:<?php
include("bans.php");
?>

<html>
<body>

<p>
Welcome People !
</p>
</body>
</html>

Can you spot the mistake I have made?

Thanks you anyway for the hard work trying to help me.
(10-21-2009, 10:41 AM)ethical_john Wrote: [ -> ]
Omg
Holy ****ing crap..... That was easy.
That wasn't on my mind since your original did work for me, ahhh glad you did it...
Omg

edit:

anyway start writing your HTML inside PHP

PHP Code:
print '<html>';

// OR

print <<<HEAD
<html><head>......
HEAD; 
Haha...

My original script works for you?

Maybe my version of Apache is more sensitive than your Apache server.
If you had error_reporting on you probably would have seen why it didn't work. Which is that you can't add the header() function once the page content is served. You would get the "Header Already Sent" error.
(10-21-2009, 11:04 AM)Omniscient Wrote: [ -> ]If you had error_reporting on you probably would have seen why it didn't work. Which is that you can't add the header() function once the page content is served. You would get the "Header Already Sent" error.

Ugh, Omniscient beat me to it; but yea that's just a HTTP protocol restriction and the only way of fixing it is make sure no content will be served before you use header()...putting at the VERY start of the page helps.
Pages: 1 2 3