Fatal error continue not in the loop or switch context in

(PHP 4, PHP 5, PHP 7, PHP 8)

(PHP 4, PHP 5, PHP 7, PHP 8)

continue is used within looping structures to
skip the rest of the current loop iteration and continue execution
at the condition evaluation and then the beginning of the next iteration.

Note:

In PHP the
switch statement is
considered a looping structure for the purposes of
continue. continue behaves like
break (when no arguments are passed) but will
raise a warning as this is likely to be a mistake. If a
switch is inside a loop,
continue 2 will continue with the next iteration
of the outer loop.

continue accepts an optional numeric argument
which tells it how many levels of enclosing loops it should skip
to the end of. The default value is 1, thus skipping
to the end of the current loop.


<?php
foreach ($arr as $key => $value) {
if (!(
$key % 2)) { // skip even members
continue;
}
do_something_odd($value);
}
$i = 0;
while (
$i++ < 5) {
echo
"Outer<br />n";
while (
1) {
echo
"Middle<br />n";
while (
1) {
echo
"Inner<br />n";
continue
3;
}
echo
"This never gets output.<br />n";
}
echo
"Neither does this.<br />n";
}
?>

Omitting the semicolon after continue can lead to
confusion. Here’s an example of what you shouldn’t do.


<?php
for ($i = 0; $i < 5; ++$i) {
if (
$i == 2)
continue
print
"$in";
}
?>

One can expect the result to be:

Changelog for continue

Version Description
7.3.0 continue within a switch that is attempting to act like a break statement for the
switch will trigger an E_WARNING.

jaimthorn at yahoo dot com

12 years ago


The remark "in PHP the switch statement is considered a looping structure for the purposes of continue" near the top of this page threw me off, so I experimented a little using the following code to figure out what the exact semantics of continue inside a switch is:

<?phpfor( $i = 0; $i < 3; ++ $i )
    {
        echo
' [', $i, '] ';
        switch(
$i )
        {
            case
0: echo 'zero'; break;
            case
1: echo 'one' ; XXXX;
            case
2: echo 'two' ; break;
        }
        echo
' <' , $i, '> ';
    }
?>

For XXXX I filled in

- continue 1
- continue 2
- break 1
- break 2

and observed the different results.  This made me come up with the following one-liner that describes the difference between break and continue:

continue resumes execution just before the closing curly bracket ( } ), and break resumes execution just after the closing curly bracket.

Corollary: since a switch is not (really) a looping structure, resuming execution just before a switch's closing curly bracket has the same effect as using a break statement.  In the case of (for, while, do-while) loops, resuming execution just prior their closing curly brackets means that a new iteration is started --which is of course very unlike the behavior of a break statement.

In the one-liner above I ignored the existence of parameters to break/continue, but the one-liner is also valid when parameters are supplied.


Nikolay Ermolenko

13 years ago


Using continue and break:

<?php

$stack
= array('first', 'second', 'third', 'fourth', 'fifth');

foreach(

$stack AS $v){

    if(
$v == 'second')continue;

    if(
$v == 'fourth')break;

    echo
$v.'<br>';

}

/*

first

third

*/

$stack2 = array('one'=>'first', 'two'=>'second', 'three'=>'third', 'four'=>'fourth', 'five'=>'fifth');

foreach(
$stack2 AS $k=>$v){

    if(
$v == 'second')continue;

    if(
$k == 'three')continue;

    if(
$v == 'fifth')break;

    echo
$k.' ::: '.$v.'<br>';

}

/*

one ::: first

four ::: fourth

*/

?>


Koen

10 years ago


If you use a incrementing value in your loop, be sure to increment it before calling continue; or you might get an infinite loop.

rjsteinert.com

11 years ago


The most basic example that print "13", skipping over 2.

<?php
$arr
= array(1, 2, 3);
foreach(
$arr as $number) {
  if(
$number == 2) {
    continue;
  }
  print
$number;
}
?>


www.derosetechnologies.com

18 years ago


In the same way that one can append a number to the end of a break statement to indicate the "loop" level upon which one wishes to 'break' , one can append a number to the end of a 'continue' statement to acheive the same goal. Here's a quick example:

<?
    for ($i = 0;$i<3;$i++) {
        echo "Start Of I loopn";
        for ($j=0;;$j++) {

                        if ($j >= 2) continue 2; // This "continue" applies to the "$i" loop
            echo "I : $i J : $j"."n";
        }
        echo "Endn";
    }
?>

The output here is:
Start Of I loop
I : 0 J : 0
I : 0 J : 1
Start Of I loop
I : 1 J : 0
I : 1 J : 1
Start Of I loop
I : 2 J : 0
I : 2 J : 1

For more information, see the php manual's entry for the 'break' statement.


greg AT laundrymat.tv

18 years ago


You using continue in a file included in a loop will produce an error.  For example:

//page1.php
for($x=0;$x<10;$x++)
   {
    include('page2.php');   
}

//page2.php

if($x==5)
    continue;
else
   print $x;

it should print

"012346789" no five, but it produces an error:

Cannot break/continue 1 level in etc.


tufan dot oezduman at gmail dot com

16 years ago


a possible explanation for the behavior of continue in included scripts mentioned by greg and dedlfix above may be the following line of the "return" documentation: "If the current script file was include()ed or require()ed, then control is passed back to the calling file."
The example of greg produces an error since page2.php does not contain any loop-operations.

So the only way to give the control back to the loop-operation  in page1.php would be a return.


clau r jimenez

1 year ago


I've been playing around to see what it does in practice. This is what helped me understand what it does and its difference with using break.

<?php
$i
= 0;
while (
$i++ < 5) {
    while (
$i % 2 === 0) {
        echo
"$i is even. n";
       
####
   
}
    echo
"$i is odd. n";
}
?>

Where ####:
- break: outputs both '$i is even' and '$i is odd' for even numbers.
- continue: infinite loop as soon as it evaluates true for the first even number.
- break 2: as soon as it runs, it exits from both loops.
- continue 2: outputs numbers correctly.

What I understand from this is that break will exit current looping structure and will keep running outer loop code. Continue will make loop get back to evaluation, and will iterate over itself until it evaluates to false. Break 2 will exit 2 levels, which in this case will stop the iteration altogether. Continue 2 will evaluate not the current loop (level 1 so to speak), but the outer loop in this case.


Geekman

15 years ago


For clarification, here are some examples of continue used in a while/do-while loop, showing that it has no effect on the conditional evaluation element.

<?php
// Outputs "1 ".
$i = 0;
while (
$i == 0) {
   
$i++;
    echo
"$i ";
    if (
$i == 1) continue;
}
// Outputs "1 2 ".
$i = 0;
do {
   
$i++;
    echo
"$i ";
    if (
$i == 2) continue;
} while (
$i == 1);
?>

Both code snippets would behave exactly the same without continue.


skippychalmers at gmail dot com

11 years ago


To state the obvious, it should be noted, that the optional param defaults to 1 (effectively).

mparsa1372 at gmail dot com

1 year ago


The continue statement breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop.

This example skips the value of 4:

<?php
for ($x = 0; $x < 10; $x++) {
  if (
$x == 4) {
    continue;
  }
  echo
"The number is: $x <br>";
}
?>


Anonymous

11 years ago


<?php

function print_primes_between($x,$y)

{

    for(
$i=$x;$i<=$y;$i++)

   {

        for(
$j= 2; $j < $i; $j++)  if($i%$j==0) continue 2;

        echo
$i.",";

   }

}

?>



This function, using continue syntax, is to print prime numbers between given numbers, x and y.

For example, print_primes_between(10,20) will output:

11,13,17,19,23,29,


maik penz

10 years ago


Please note that with PHP 5.4 continue 0; will fail with

PHP Fatal error:  'continue' operator accepts only positive numbers

(same is true for break).


net_navard at yahoo dot com

17 years ago


Hello firends

It is said in manually:
continue also accepts an optional numeric argument which tells it how many levels of enclosing loops it should .

In order to understand better this,An example for that:
<?php/*continue also accepts an optional numeric argument which
    tells it how many levels of enclosing loops it should skip.*/
for($k=0;$k<2;$k++)
{
//First loopfor($j=0;$j<2;$j++)
    {
//Second loopfor($i=0;$i<4;$i++)
      {
//Third loop
   
if($i>2)
    continue
2;// If $i >2 ,Then it skips to the Second loop(level 2),And starts the next step,
   
echo "$in";
       }

    }

}

?>

Merry's christmas :)

    With regards,Hossein


dedlfix gives me a hint

18 years ago


a possible solution for
greg AT laundrymat.tv

I've got the same problem as Greg
and now it works very fine by using
return() instead of continue.

It seems, that you have to use return()
if you have a file included and
you want to continue with the next loop


Anonymous

14 years ago


The continue keyword can skip division by zero:
<?php
$i
= 100;
while (
$i > -100)
{
   
$i--;
    if (
$i == 0)
    {
        continue;
    }
    echo (
200 / $i) . "<br />";
}
?>

send at mail dot 2aj dot net

5 years ago


As of PHP 7.0, instead of code executing up until encountering a continue (or break) call outside of a loop statement, the code will simply not execute.

If you need to correct such error cases as part of an upgrade, you may need to substitute either an exit or return to maintain the existing behavior of such legacy code.

<?phpclass ok {

    function

foo() {
        echo
"startn";

        for (

$i = 0; $i < 5; $i++) {
            echo
"beforen";
           
$this->bar($i);
            echo
"aftern";
        }

        echo

"finishn";
    }

    function

bar($i) {
        echo
"inside iteration $in";

                if (

$i == 3) {
            echo
"continuingn";
            continue;
        }

        echo

"inside after $in";
    }
}
$ex = new ok();$ex->foo();?>

sh> php56 continue.php
start
before
inside iteration 0
inside after 0
after
before
inside iteration 1
inside after 1
after
before
inside iteration 2
inside after 2
after
before
inside iteration 3
continuing
PHP Fatal error:  Cannot break/continue 1 level in continue.php on line 22
PHP Stack trace:
PHP   1. {main}() continue.php:0
PHP   2. ok->foo() continue.php:31
PHP   3. ok->bar() continue.php:10

sh> php70 continue.php
PHP Fatal error:  'continue' not in the 'loop' or 'switch' context in continue.php on line 22

Fatal error: 'continue' not in the 'loop' or 'switch' context in continue.php on line 22


John

8 years ago


<?phpecho"n";
echo
"n";

    for (

$i = 0; $i < 5; $i++ ) {

        switch (

$i)
        {

            case

0:
                echo
$i . "b";
                continue;
                echo
$i . "a";
            case
1:   
                echo
$i . "b";
                continue
2;
                echo
$i . "a";
            case
2:   
                echo
$i . "b";
                break;
                echo
$i . "a";
            case
3:
                echo
$i . "b";
                break
2;
                echo
$i . "a";
            case
4:
                echo
$i;

                    }

        echo

9;

    }

echo

"n";
echo
"n";?>

This results in: 0b91b2b93b

It goes to show that in a switch statement break and continue are the same. But in loops break stops the loop completely and continue just stops executing the current iterations code and moves onto the next loop iteration.


szrrya at yahoo dot com

16 years ago


Documentation states:

"continue is used within looping structures to skip the rest of the current loop iteration"

Current functionality treats switch structures as looping in regards to continue.  It has the same effect as break.

The following code is an example:

<?php
for ($i1 = 0; $i1 < 2; $i1++) {
 
// Loop 1.
 
for ($i2 = 0; $i2 < 2; $i2++) {
   
// Loop 2.
   
switch ($i2 % 2) {
      case
0:
        continue;
        break;
    }
    print
'[' . $i2 . ']<br>';
  }
  print
$i1 . '<br>';
}
?>

This outputs the following:
[0]
[1]
0
[0]
[1]
1

Switch is documented as a block of if...elseif... statements, so you might expect the following output:
[1]
0
[1]
1

This output requires you to either change the switch to an if or use the numerical argument and treat the switch as one loop.


Rene

16 years ago


(only) the reason that is given on the "Continue with missing semikolon" example is wrong.

the script will output "2" because the missing semikolon causes that the "print"-call is executed only if the "if" statement is true. It has nothing to to with "what" the "print"-call would return or not return, but the returning value can cause to skip to the end of higher level Loops if any call is used that will return a bigger number than 1.

<?php
continue print "$in";
?>

because of the optional argument, the script will not run into a "unexpected T_PRINT" error. It will not run into an error, too, if the call after continue does return anything but a number.

i suggest to change it from:
because the return value of the print() call is int(1), and it will look like the optional numeric argument mentioned above.

to
because the print() call will look like the optional numeric argument mentioned above.


New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

brandonpeat opened this issue

Aug 9, 2017

· 19 comments

Comments

@brandonpeat

Switched my server to PHP 7.1 and the site crashed, here’s the error I got:

Fatal Error (E_COMPILE_ERROR): ‘continue’ not in the ‘loop’ or ‘switch’ context occurred in wp-content/plugins/cherry-plugin/includes/widgets/widgets-manager.php on line 563.

Switched back to PHP 5.6 and it worked again. Is there a fix yet for 7.1? I need to get that server upgraded.

@brandonpeat

Looks like somebody else had this same problem in #36 , it was closed but I don’t see a solution??

@brandonpeat

Looks like the site in question is running Cherry 3.1.5, which I’m guessing is end-of-lifed with no PHP 7.1 support planned? I inherited this site from a prior developer so I’ve finding lots of these fun surprises. Thanks.

@DuckDivers

Change line 564 of /plugins/cherry-plugin/includes/widgets/widgets-manager.php from:

if ( !isset($wp_registered_widgets[$id]) ) continue;
to
if ( !isset($wp_registered_widgets[$id]) ) return false;

KyleStank, danielstoellner, christinairwin, multistarmedia, zcourts, Leonel4826, hirushacooray, MarkusWolf, anand-shah, Johannes-Hartmann, and 25 more reacted with thumbs up emoji
blogtutor, acharyasarvesh, fadupla, loretoparisi, christinairwin, multistarmedia, Johannes-Hartmann, stephenautomatik, BravOFF, cosmikdust, and 4 more reacted with hooray emoji
loretoparisi, multistarmedia, skarabasakis, Leonel4826, hirushacooray, Johannes-Hartmann, BravOFF, gxsoft, jagdishsarma36, adamczykpiotr, and 2 more reacted with heart emoji
BravOFF, MisterWP, paydana, and mattegab reacted with rocket emoji
MisterWP reacted with eyes emoji

@brandonpeat

@loretoparisi

@brandonpeat @DuckDivers thanks guys I had exactly the same issue when trying wp plugin list. Question: will be this merged into the master at some point?

@christinairwin

Thanks so much for posting this. I have seen this issue pop up on a client’s WP theme a couple of times and I was searching for a way to fix it. That did the trick! Thanks again!

@loretoparisi

@christinairwin it works, the only problem is that I’m not sure it has been released, and several templates did not get the update, so it is better to fix «by the hands»!

@Leonel4826

Muchas Gracias, esto me ha funcionado! —> return false;

@suppli3r

The solutions was great.

It worked perfectly.

thanks a lot

@MisterWP

Change line 564 of /plugins/cherry-plugin/includes/widgets/widgets-manager.php from:

if ( !isset($wp_registered_widgets[$id]) ) continue;
to
if ( !isset($wp_registered_widgets[$id]) ) return false;

My hero

@kaydeeweb

Change line 564 of /plugins/cherry-plugin/includes/widgets/widgets-manager.php from:

if ( !isset($wp_registered_widgets[$id]) ) continue;
to
if ( !isset($wp_registered_widgets[$id]) ) return false;

Thanks so much DUCK DIVERS, this fixed my Heroic Gallery Manager plugin.

For anyone else — I changed line 1043 on file ht-gallery-manager.php (in plugin root directory)

From:

To:
return false;

@gxsoft

@sarah4321

I created an account here just so that I could say thank you to @DuckDivers for posting this solution. My problem was with a theme, but it worked like a charm. Thank you!!!

@Nikoyo

I am very glad that I’ve found this easy solution ! Regards MisterWP

@neoarksoftware

Wow..! It’s working for me. I love this solution.

Thanks Duck Divers,

@TCS-VM

Followed instructions and changed /plugins/cherry-plugin/includes/widgets/widgets-manager.php from:

if ( !isset($wp_registered_widgets[$id]) ) continue;
to
if ( !isset($wp_registered_widgets[$id]) ) return false;

That simple change got site up and running again, thanks DuckDivers.

@jolosimeon

Just wanted to comment thanks to DuckDivers! Worked great.

@lobebe

You are an angel….thank you for this.

@mariopaolucci

DyadyaGe

17 / 12 / 5

Регистрация: 04.04.2019

Сообщений: 599

1

18.05.2019, 00:08. Показов 2641. Ответов 7

Метки нет (Все метки)


Так понимаю, что типа continue не есть участником цикла. Но у меня строка начинается с if, а это ведь один из циклов.

PHP
1
2
if (preg_match("/(регулярка)/",$name)) {continue;} 
else

Мне нужно пропустить одно условие, чтоб эти результаты не рассматривались. Раньше, во вроде бы подобных ситуациях такое работало. Где может быть проблема?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



1084 / 746 / 364

Регистрация: 09.07.2018

Сообщений: 1,760

18.05.2019, 00:21

2

Цитата
Сообщение от DyadyaGe
Посмотреть сообщение

строка начинается с if, а это ведь один из циклов

Нет, это условный оператор, а не цикл

Добавлено через 57 секунд

Цитата
Сообщение от DyadyaGe
Посмотреть сообщение

Мне нужно пропустить одно условие, чтоб эти результаты не рассматривались

Какое условие? Опишите словесно.



0



17 / 12 / 5

Регистрация: 04.04.2019

Сообщений: 599

18.05.2019, 11:43

 [ТС]

3

Цитата
Сообщение от Строитель
Посмотреть сообщение

Нет, это условный оператор, а не цикл

А разве цикл не может начинаться с условного оператора if?

Цитата
Сообщение от Строитель
Посмотреть сообщение

Какое условие? Опишите словесно.

Оно в принципе в первом сообщении темы… Есть определенное количество информации, скажем строк. Строки могут добавляться. Некоторые повторяются полностью, некоторые могут начинаться на «начало» этих повторяющихся строк, и есть строки вообще без такого «начала». Нужно откидывать строки с таким «началом» из дальнейшей обработки. По идее регулярка и continue должны были решить эту задачу. Я один раз уже так делал, правда там if и continue стояли внутри перебора (цикла) foreach.



0



Строитель

1084 / 746 / 364

Регистрация: 09.07.2018

Сообщений: 1,760

18.05.2019, 12:06

4

Лучший ответ Сообщение было отмечено DyadyaGe как решение

Решение

А разве цикл не может начинаться с условного оператора if?

Нет. Операторы циклов называются так: while, do{}while, for, foreach.
Условный оператор if может быть прописан как в теле любого из циклов, так и за его пределами. А вот оператор continue должен быть прописан только в теле цикла (и как правило, в теле условного оператора, прописанного в цикле).

Добавлено через 4 минуты
А условие можно записать так:

PHP
1
2
3
if (! preg_match("/(регулярка)/", $name)) {
    // Выполнять блок кода
}



0



17 / 12 / 5

Регистрация: 04.04.2019

Сообщений: 599

18.05.2019, 12:32

 [ТС]

5

Цитата
Сообщение от Строитель
Посмотреть сообщение

Нет. Операторы циклов называются так: while, do{}while, for, foreach.

Вот почему у меня во казалось бы похожей ситуации сработал… Стоял внутри foreach.

Цитата
Сообщение от Строитель
Посмотреть сообщение

А условие можно записать так:

Все гениальное — просто. И с другой стороны — о, этот великий и могучий язык программирования, в нем столько синонимов…
Спасибо, вижу, что работает, потому что когда выбираю файл без таких регулярок в начале строки, то отрабатывает нормально. А когда есть такая регулярка, то потом либо ничего не происходит, либо появляется какое-то количество Варнингов. Надо пробовать подружить эту строку с оставшейся частью кода. Я так понимаю — вопрос решен. Ведь остальное уже выходит за его пределы?



0



1084 / 746 / 364

Регистрация: 09.07.2018

Сообщений: 1,760

18.05.2019, 13:58

6

Я так понимаю — вопрос решен. Ведь остальное уже выходит за его пределы?

Похоже что да. Теперь вам нужно разбираться с регуляркой.



0



DyadyaGe

17 / 12 / 5

Регистрация: 04.04.2019

Сообщений: 599

18.05.2019, 14:55

 [ТС]

7

Цитата
Сообщение от Строитель
Посмотреть сообщение

Похоже что да. Теперь вам нужно разбираться с регуляркой.

С регуляркой все в порядке, проверяю вот так

PHP
1
if (preg_match("/регулярка/",$name,$matches)) {print_r($matches);}

печатает первое вхождение, а с отрицанием нет. Значит работает. Тут у меня вопрос дальнейшего механизма сортировки не получается. Но и правда будем считать вопрос решенным. Ведь и правда вариантов организации пропуска много, а не только continue. Спс за подсказку. Буду думать дальше. Хоть тему новую начинай )))



0



17 / 12 / 5

Регистрация: 04.04.2019

Сообщений: 599

19.05.2019, 01:21

 [ТС]

8

Сделал немного не так. Разбил функцию на две ветки. Одна обрабатывает один шаблон и выводит в список. Вторая ищет второй шаблон (он частная ситуация первого) создает массив, потом обрабатывает текст на основе первого шаблона и создает массив результатов, массивы сравниваются с помощью array_dif, соответственно частный случай удаляется, затем пересобираю полученый массив с помощью array_values, ключи переписываются и создается список. Вот теперь точно тема закрыта. ))) В любом случае Строитель, спасибо, дали почву для размышления, ато зациклился на одном )))



1



  • #1

При переходе на PHP 7.2 пустая страница ??? Ошибок display_errors не выдает? mysql перевел на mysqli? Как осуществить переход? Где рыть?

grigori


  • #3

смотри ошибки в логах веб-сервера, в логах php, если их нет — включи логгирование ошибок

  • #4

смотри ошибки в логах веб-сервера, в логах php, если их нет — включи логгирование ошибок

Где найти? Сайт на VDS, Centos 6, Apache 2.2

  • #5

PHP Fatal error: ‘continue’ not in the ‘loop’ or ‘switch’ context in /home/var………………………/………/222222y.php on line 200

И что непонятно в тексте ошибки?

  • #6

И что непонятно в тексте ошибки?

А что не так?
continue;

  • #7

continue используется внутри циклических структур для пропуска оставшейся части текущей итерации цикла и, при соблюдении условий, начала следующей итерации.

  • #8

Текст ошибки переведи, и покажи код 222222y.php line 200 ± 10 строк.

  • #9

Текст ошибки переведи, и покажи код 222222y.php line 200 ± 10 строк.

PHP Неустранимая ошибка: «продолжить» не в контексте «loop» или «switch» в / home / var ……………………… /………/222222y.php в строке 200

  • er1.JPG

    99,4 KB
    Просмотры: 9

  • #10

Ну и где в твоём коде continue используется в цикле или в конструкции switch?
if – это, по твоему, циклическая структура?

P.S.: И пости код как код – а не картинками, бесит страшно.

  • #11

Ну и где в твоём коде continue используется в цикле или в конструкции switch?
if – это, по твоему, циклическая структура?

P.S.: И пости код как код – а не картинками, бесит страшно.

Не используется. If -походу не циклическая структура. Как исправить?

  • #12

Оператор switch похож на ряд операторов IF с одинаковым условием. Во многих случаях вам может понадобиться сравнивать одну и ту же переменную (или выражение) с множеством различных значений и выполнять различные участки кода в зависимости от того, какое значение принимает эта переменная (или выражение). Это именно тот случай, для которого удобен оператор switch.
http://php.net/manual/ru/control-structures.switch.php

  • #13

Манула пишет: continue принимает необязательный числовой аргумент, который указывает на скольких уровнях вложенных циклов будет пропущена оставшаяся часть итерации. Значением по умолчанию является 1, при которой пропускается оставшаяся часть текущего цикла.

PHP:

<?php
foreach ($arr as $key => $value) {
    if (!($key % 2)) { // пропуск четных чисел
        continue;
    }
    do_something_odd($value);
}

$i = 0;
while ($i++ < 5) {
    echo "Снаружи<br />n";
    while (1) {
        echo "В середине<br />n";
        while (1) {
            echo "Внутри<br />n";
            continue 3;
        }
        echo "Это никогда не будет выведено.<br />n";
    }
    echo "Это тоже.<br />n";
}
?>

  • #14

Так я не понял из всего этого потока кода и твоего сознания – ты решил свою проблему или нет?
А то в крайних твоих двух постах нет ни одного главного признака вопросительных предложений.

  • #15

Проблема частично решена. Вместо текста выдается ???? и долго грузиться

  • #16

посмотрите на настройки php (в php.ini) которые были раньше и те что теперь

  • #17

Предыдущие проблемы решены. Возникла новая проблема.
Parse error: syntax error, unexpected ‘MODULE_DB_NAME’ (T_STRING), expecting ‘,’ or ‘)’ in /home/………php on line 82

82: $rsFields = (($___mysqli_tmp = mysqli_query( $TDMCore->rsSQL, «SHOW COLUMNS FROM $TDMCore->arConfig[«MODULE_DB_NAME»].$Table»)) ? $___mysqli_tmp : false);

c0dex


  • #18

@watsongx,

PHP:

$rsFields = (($___mysqli_tmp = mysqli_query( $TDMCore->rsSQL, "SHOW COLUMNS FROM $TDMCore->arConfig["MODULE_DB_NAME"].$Table")) ? $___mysqli_tmp : false);

Сам найдешь почему ошибка?

  • #19

@watsongx,

PHP:

$rsFields = (($___mysqli_tmp = mysqli_query( $TDMCore->rsSQL, "SHOW COLUMNS FROM $TDMCore->arConfig["MODULE_DB_NAME"].$Table")) ? $___mysqli_tmp : false);

Сам найдешь почему ошибка?

Нужно так ???

PHP:

".($TDMCore->arConfig["MODULE_DB_NAME"]).".

c0dex


  • #20

@watsongx, ты гадаешь, а надо понимать почему у тебя кавычки наложились на кавычки…

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error call to undefined function imagewebp
  • Fatal error borderlands 2 как исправить
  • Fatal error blog
  • Fatal error beamng drive has attempted to use more memory что делать
  • Fatal error batman arkham knight что делать

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии