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

Sales orders ans reservations not taken into account on MPS / MRP
Hello,

I am implementing the MPS / MRP and I have the following problem:

I ha

Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

* Gridview and Detailsview in UpdatePanel, insert mode problem
I have a GridView and DetailsView working together. When a record from Gridview is selected, Detail

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

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