error in next page ?

Discussion in 'PHP' started by mailtoankit09, Aug 5, 2010.

  1. #1
    Hello I don't have Good knowledge of PHP but anyone can please tell me this i want this error on my new page "www.example.com/error.php" what code i use ?



    please reply
     
    mailtoankit09, Aug 5, 2010 IP
  2. joseph pop

    joseph pop Guest

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello,

    Put error_reporting(0) and then writing errors to a log
     
    joseph pop, Aug 5, 2010 IP
  3. mailtoankit09

    mailtoankit09 Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry , i mean i want this error in "error.php" not same page


    this code is in my index.php & i want this error in "error.php"

    in simple word if error comes page redirect to "mydomain.com/error.php"

     
    mailtoankit09, Aug 5, 2010 IP
  4. arpit13

    arpit13 Well-Known Member

    Messages:
    294
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    128
    Digital Goods:
    1
    #4
    try this:
    
    if ($noax == 1) {
    echo "<Script language='javascript'>window.location='error.php';</script>";
    }
    else //your code here
    
    PHP:
    end of course error.php is:
     
    Out of Time Support. Please come back tomorrow !
    
    Code (markup):
     
    arpit13, Aug 6, 2010 IP
  5. mailtoankit09

    mailtoankit09 Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello Arpit ,

    Thank you So much for help :) ................

    Again Thx
     
    mailtoankit09, Aug 6, 2010 IP