Page 1 of 1

Strange

Posted: Fri Jun 20, 2003 10:49 pm
by dethron
Hi everyone :D ;

I have a strange problem that i can not solved.

Code: Select all

<?php 
if(cond1)&#123;
   if(cond2)&#123;
   &#125;else&#123;
            echo "here1";
            require('show_result.php');
    &#125;
&#125;else&#123;
   echo "here2";
   require('show_result.php');
&#125;
?>
The show_result.php is the following

Code: Select all

<?php
echo "here3";
?>
And the strange tragedy is that;
the result which is :

here2

:roll:
How it can be possiple to give such an output?
I was a little bit confused, and so many hours has been passed without sleep. If anyone have an idea, please share with me.
8O

Posted: Sat Jun 21, 2003 5:36 am
by twigletmac
Topic moved to PHP - Normal.

Could you show us your actual code to help us see what might be happening. Is it possible that display_errors is off and the show_result.php page could not be included?

Mac

:) solved....

Posted: Sat Jun 21, 2003 5:45 am
by dethron
Thanx a lot,
i just realized the problem 10 minutes ago :lol:
As you mentioned in your post since display message is off,
the problem stay invisible to me. :oops:

since i include the part that contains "if-else" s with

Code: Select all

@include('ifelsepart.php');
when a problem occurs in the process of require for show_result.php

apache stops the execution of this file without a error message.

And the problem i found in the show_result.php is just a little parse error :D

Thanx...


P.S : Be aware when you are usinq "@" :wink: