-1

It is defined in a config.php file

define("url_money", "www.himanshu1234.net63.net/MoneyManager/");

it is included in some other file like

include_once './config.php';

and used like this

<?php
    header('Location: '.url_money.'login.php');  
}
?>

there is some problem in it but unable to sort out.. !!

Sam
  • 7,252
  • 16
  • 46
  • 65
user32876
  • 65
  • 2
  • 12

2 Answers2

4

Change

define("url_money", "www.himanshu1234.net63.net/MoneyManager/");

to

define("url_money", "http://www.himanshu1234.net63.net/MoneyManager/");

When you define some link without http:// then it will be treated as relative link. So you were actually redirected to /www.himanshu1234.net63.net/MoneyManager/

Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
xiidea
  • 3,344
  • 20
  • 24
0

I had an issue like this, and I made a stupid mistake. Then I saw

It is important to notice that header() must be called before any actual output is sent

So, please double-check whether there is any echo or printf, etc... costed me a few hours some years ago!

Steven X
  • 394
  • 1
  • 3
  • 14
  • No bro.. no echo.. Is there any alternate way, what I am trying to do!! – user32876 Apr 11 '14 at 18:16
  • An alternative would be doing this with JavaScript, it would still be a redirect, but not a php redirect. See: http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript I've copied the code into a testfile on my server, and it worked immediately. Could you provide more code, please? – Steven X Apr 11 '14 at 18:21