1
k1ll3rdr4g0n
PHP code not working

ok i put the following code in a custom block as tried it both as HTML and PHP

require("http://www.thatgamingsite.ath.cx/webstats/include/functions.php");

echo "Number of people today: " . stat_value("todayunique") . "<br>";
echo "Number of people this week: " . stat_value("weekhits") . "<br>";
echo "Record of people in one day: " . stat_value("record_day") . "<br>";
echo "Total Hits: " . stat_value("totalhits") . "<br><br>";

echo 'View the 5 day trend <a href="http://www.thatgamingsite.ath.cx/webstats/index.php?act=trend">here</a>.<br>';
echo 'Powered by <a href="http://www.thatgamingsite.ath.cx/webstats/"> Elite Stats </a>';


Ive also tried it with <?php ?> and it still doesnt work.

I even tried it in a seperate file, and it works there.

Anyone know what im doing wrong?

2
Chris03
Re: PHP code not working
  • 2004/10/31 3:23

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


Yes you cannot include a HREF to a php document as there webserver will parse it out

3
k1ll3rdr4g0n
Re:PHP code not working

does anyone know?

4
Chris03
Re:PHP code not working
  • 2004/11/2 22:54

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


You cannot include a link to a PHP document....

Go to the php document in a browser and you will see that IIS or Apache or whatever there webserver is, is parsing the file to HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>


that is the source code that is give.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits