include function being weird?


Posted on 16th Feb 2014 07:03 pm by admin

I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it outputs a 1 at the end!!
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
<font style="color:#333;">IP Address to Analyse:</font> <input type="text" value="<?php echo include('./disp_ip.php'); ?>" size="20" maxlength="20" name="IPaddr"><br />
<input style="color:#333;" type="submit" value="submit" name="submit">

Is the code, note NO 1. Disp_ip.php has this simple code:
<?php echo $_SERVER['REMOTE_ADDR']; ?>

Yet I get this insanely weird result?
<input type="text" name="IPaddr" maxlength="20" size="20" value="64.180.2.2341"/>

Where on earth is this 1 coming from? it appears EVERY time I echo disp_ip.php

No comments posted yet

Your Answer:

Login to answer
170 Like 20 Dislike
Previous forums Next forums
Other forums

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

Need help making a script that moves data into acrhive table
Hi,

I'm kinda new to php/mysql

And i wrote a simple script to store sales lead for a b

Require select-option functionality in Module Pool Programming
Hi Gurus,

I am doing a development by Module Pool on Warehouse Management. For that devel

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

Limiting checkboxes?
Hi guys,

I have this code: Code: if(isset($_POST['selected'])) {
foreach($_POST['selec

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

Comparing two dates
Hi Guys
I have two dates I want to compare. Below is my current implementation. The problem with

Lack of simpleXML Documentation
What is up with this.

Look at: http://www.php.net/manual/en/function.simplexml-load-file.php<

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash