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 and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?

im using ftp_put and it returns fa

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

how to transport the Query and insfoset
Hi

I have created the query using SQ01........
How to created T-code for query..

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

mysql UPDATE request not working and driving me crazy!!!
Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database

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