Openshift限制循环吗?

时间:2013-04-04 14:51:26

标签: openshift

我正在开发Openshift clound上的应用程序。

请参阅此脚本:

 foreach ( $needle['tbody']['tr']['td'] as $key=>$values ){
      ....
      foreach( $values['table']['tr']['td'] as $value ){
        ....
        foreach ( $value['table']['tbody']['tr'] as $td_key => $td  ){

        }
        node_save($node);


$value['table']['tbody']['tr'] contains this values:
Array
(
    [0] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => tinh
                        )

                    [a] => Äồng Nai
                )

        )

    [1] => Array
        (
            [td] => 
                4K1
        )

    [2] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai8
                        )

                    [div] => 27
                )

        )

    [3] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai7
                        )

                    [div] => 490
                )

        )

    [4] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai6
                        )

                    [div] => Array
                        (
                            [0] => 9861
                            [1] => 3667
                            [2] => 9921
                        )

                )

        )

    [5] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai5
                        )

                    [div] => 0262
                )

        )

    [6] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai4
                        )

                    [div] => Array
                        (
                            [0] => 95163
                            [1] => 89551
                            [2] => 99648
                            [3] => 39782
                            [4] => 69694
                            [5] => 09915
                            [6] => 90402
                        )

                )

        )

    [7] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai3
                        )

                    [div] => Array
                        (
                            [0] => 57076
                            [1] => 54943
                        )

                )

        )

    [8] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai2
                        )

                    [div] => 07304
                )

        )

    [9] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giai1
                        )

                    [div] => 34882
                )

        )

    [10] => Array
        (
            [td] => Array
                (
                    [@attributes] => Array
                        (
                            [class] => giaidb
                        )

                    [div] => 339136
                )

        )

)

foreach($ value ['table'] ['tbody'] ['tr']为$ td_key => $ td){...仅循环2次且无法到达node_save($ node);.我想知道Openshift是否限制了循环? 这个脚本在localhost上运行正常。

1 个答案:

答案 0 :(得分:0)

看到日志中抛出的内容会很有趣。发布您看到的任何错误:https://www.openshift.com/faq/how-to-troubleshoot-application-issues-using-logs