title: AngularJs will not work after using php include_once function
body: <p>I am using angularjs for front end and php for backend.I have written some code in angular it is working fine before including the header.php function.But, after including the header.php it is not working.It is not giving any error also.I am not getting where I went wrong also.</p>
  
  <p>showAllproject.php is,</p>
  
  <pre><code>&lt;?php
    include_once 'C:\wamp64\www\Performance\header\src\demo\header.php';
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"&gt;
  
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;!--Angularjs--&gt;
      &lt;script data-require="angular.js@*" data-semver="1.6.9" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular.js"&gt;&lt;/script&gt;
     &lt;script&gt;
          angular.module('myApp', []).controller('namesCtrl', function($scope) {
          $scope.names = [
          {name:'PROJECT'},
          {name:'| DESCRIPTION'},
          {name:'| CREATED ON'},
          {name:'| LAST UPDATED'},
          {name:'| '}
      ];
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body style="height:100%"&gt;
  &lt;div class="row" &gt;
      &lt;div class="container-fluid"&gt;
          &lt;div class="col-lg-14" style="background-color:#DCDCDC;height:50px;position:fixed"&gt;     
          &lt;/div&gt;
      &lt;div ng-app="myApp" ng-controller ="namesCtrl" style="background-color:#DCDCDC;height:500px;margin-top:1cm;margin-left:1cm;margin-right:2cm;" class=" row vertical-center-row"&gt;
      &lt;div class="col-lg-12" style="background-color:green;height:1cm;"&gt;
      &lt;div  class="row"&gt;
          &lt;div ng-repeat="x in names" style="margin-right:4cm;margin-left:1cm;" class="col-xs-6"&gt;
          {{x.name}}
          &lt;/div&gt;
       &lt;/div&gt;
       &lt;/div&gt;
       &lt;div class="col-lg-12" style="background-color:blue;height:80%;max-height:80%;overflow: auto;"&gt;
       &lt;div  class="row"&gt;
          &lt;div ng-repeat="x in names" style="margin-right:4cm;margin-left:1cm;" class="col-xs-6"&gt;
  
          &lt;/div&gt;
       &lt;/div&gt;
       &lt;/div&gt; 
       &lt;div class="col-lg-12" style="background-color:green;height:1cm;"&gt;
       &lt;/div&gt;      
    &lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>header.php is,</p>
  
  <pre><code>&lt;?php
  //calling methods of methods.php file
  include_once 'C:/wamp64/www/performance/header/src/demo/methods.php';
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;  
      &lt;link rel="shortcut icon" type="image/png" href="http://localhost/performance/login/images/merahkee.png" /&gt; 
      &lt;title&gt; Merahkee Technology Soluctions&lt;/title&gt;
      &lt;!-- Bootstrap core CSS --&gt;
      &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"&gt;
      &lt;!-- SmartMenus jQuery Bootstrap 4 Addon CSS --&gt;
      &lt;link href="../addons/bootstrap-4/jquery.smartmenus.bootstrap-4.css" rel="stylesheet"&gt;
      &lt;!--Angularjs--&gt;
      &lt;script data-require="angular.js@*" data-semver="1.6.9" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.js"&gt;&lt;/script&gt;
      &lt;!--This version is for title attribute--&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.js"&gt;&lt;/script&gt;
      &lt;!--Angularjs starts--&gt;
      &lt;script&gt;
          var rootApp = angular.module('rootApp', ['firstApp','secondApp']);
          var firstApp = angular.module('firstApp', []);
          firstApp.controller('firstController', function($scope) {
            $scope.pageTitle = "MerahkeeCloudMeter";
          });
          var secondApp = angular.module('secondApp', []);
          secondApp.controller('SecondController', function($scope) {
              $scope.Reports="Reports";
          });
          var fourApp = angular.module('fourApp', []);
          secondApp.controller('fourController', function($scope) {
              $scope.Test="Test";
          });
          var thirdApp = angular.module('thirdApp', []);
          secondApp.controller('thirdController', function($scope) {
              $scope.Project="Project";
          });
          var fifthApp = angular.module('fifthApp', []);
          secondApp.controller('fifthController', function($scope) {
              $scope.Report="Report";
          });
          var sixthApp = angular.module('sixthApp', []);
          secondApp.controller('sixthController', function($scope) {
              $scope.default="Default Workspace";
              $scope.details = [
              {name:'help',href:'#'},
              {name:'settings',href:'#'},
              {name:'logout',href:'http://localhost/performance/login/logout.php?logout'}
          ];
          });
          var seventhApp = angular.module('seventhApp', []);
          secondApp.controller('seventhController', function($scope) {
              $scope.sdc_pro = [
              {name:'Show All Projects',href:'http://localhost/performance/showAll_project.php?user_id='},
              {name:'Delete',href:'http://localhost/performance/delete_test.php?user_id='},
              {name:'Create Projects',href:'http://localhost/performance/Create_test.php?user_id='}
          ];
          });
          var eighthApp = angular.module('eighthApp', []);
          secondApp.controller('eigthController', function($scope) {
              $scope.sdc_test = [
              {name:'Show All Tests',href:'http://localhost/performance/showAll_test.php?user_id='},
              {name:'Delete',href:'http://localhost/performance/delete_project.php?user_id='},
              {name:'Create Tests',href:'http://localhost/performance/Project_form.php?user_id='}
          ];
          });
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body style="padding-top:80px;"&gt;
      &lt;!-- Navbar --&gt;
      &lt;nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark"&gt;
        &lt;div ng-app="rootApp" class="container"&gt;
          &lt;a ng-app = "firstApp" ng-controller = "firstController" class="navbar-brand" href="#"&gt;{{ pageTitle }}&lt;/a&gt;
           &lt;div class="collapse navbar-collapse" id="navbarNavDropdown"&gt;
            &lt;!-- Left nav --&gt;
            &lt;ul class="nav navbar-nav mr-auto"&gt;
            &lt;!--Display project dropdown--&gt;
              &lt;li ng-app = "thirdApp" ng-controller = "thirdController" class="nav-item dropdown" style="padding-right:15px;" &gt;&lt;a class="nav-link dropdown-toggle" href="#"&gt;{{Project}}&lt;/a&gt;
                &lt;ul class="dropdown-menu"&gt;
                &lt;?php
                    echo '&lt;li&gt;&lt;a class="dropdown-item"&gt;Recent Projects &lt;/a&gt;&lt;/li&gt;';
                        for($i=0;$i&lt;$projectcount;$i++){
              //calling test_name() method and storing those values in a string
                          $test=project_name($count_uid,$user_id,$pro_sql);
                          $project_name=$test[$i];
  
                          if(strlen($project_name)&gt;=25){
                              $projectName=substr($project_name,0,25);
                              $projectName=$projectName.'..';
                              }
                          else{
                              $projectName=$project_name;
                           } 
                          echo'&lt;li&gt;&lt;a class="dropdown-item" href="http://localhost/performance/ShowTest_of_project.php?project_name='.$project_name.'&amp;user_id='.$user_id.'" title="'.$project_name.'"&gt;'.$projectName.'&lt;/a&gt;&lt;/li&gt;';
                       }//for loops ends
  
                      //show all projects     
                      echo'&lt;li ng-app = "seventhApp" ng-controller = "seventhController"&gt;&lt;a ng-repeat="x in sdc_pro" class="dropdown-item" href="{{x.href}}'.$user_id.'"&gt;{{x.name}}&lt;/a&gt;&lt;/li&gt;';
               ?&gt;
               &lt;/ul&gt;&lt;!--dropdown-menu closes--&gt;
            &lt;/li&gt;&lt;!--project dropdown ends--&gt;
              &lt;li ng-app = "fourApp" ng-controller = "fourController" class="nav-item dropdown"&gt;&lt;a style="padding-right:15px;" class="nav-link dropdown-toggle" href="#"&gt;{{Test}}&lt;/a&gt;
                &lt;ul class="dropdown-menu"&gt;
                    &lt;?php
                        echo '&lt;li&gt;&lt;a class="dropdown-item"&gt;Recent Tests &lt;/a&gt;&lt;/li&gt;';
                            for($i=0;$i&lt;$testcount;$i++){
                                      //calling test_name() method and storing those values in a string
                                      $test1=recent_test1($test_sql);
                                      $test_name1=$test1[$i];
                                      //project name
                                      $project=recentTest_project($test_sql);
                                      $project_name=$project[$i];
                                      //platform file name
                                      $platform=platform_file();
                                      $platform_file=$platform[$i];
  
                                      //project id
                                      $project_id=pro_id($test_sql);
                                      $pro_id=$project_id[$i];
  
                                     //calling file_name() method and storing those values in a string
                                      //$file=load_file_name();
                                      //$file_name=$file[$i];
  
                                      //echo' &lt;a type="submit" name="testname"  href='.$file_name.'&gt;'.$test_name.'&lt;/a&gt;&lt;br&gt;';
  
  
                                     if(strlen($test_name1)&gt;=25){
                                          $testName=substr($test_name1,0,25);
                                          $testName=$testName.'..';
                                      }
                                       else{
                                          $testName=$test_name1;
                                      }
                              echo'&lt;li&gt;&lt;a class="dropdown-item" href="http://localhost/performance/RunTest_09.php?test_name='.$test_name1.'&amp;project_name='.$project_name.'" title="'.$test_name1.'"&gt;'.$testName.'&lt;/a&gt;&lt;/li&gt;';
                           }//for loops ends
                      //show all projects ,delete project and create project  
                    echo'&lt;li ng-app = "eighthApp" ng-controller = "eigthController"&gt;&lt;a ng-repeat="x in sdc_test" class="dropdown-item" href="{{x.href}}'.$user_id.'"&gt;{{x.name}}&lt;/a&gt;&lt;/li&gt;';
                  ?&gt;
                &lt;/ul&gt;   
              &lt;/li&gt;&lt;!--test dropdown ends--&gt;
              &lt;li ng-app = "fifthApp" ng-controller = "fifthController" class="nav-item dropdown"&gt;&lt;a class="nav-link dropdown-toggle" href="#"&gt;{{Report}}&lt;/a&gt;
                  &lt;ul class="dropdown-menu"&gt;
                  &lt;li&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;&lt;!--report list ends--&gt;
            &lt;/ul&gt;
            &lt;ul class="nav navbar-nav"&gt;
             &lt;li ng-app = "sixthApp" ng-controller = "sixthController"  class="nav-item dropdown"&gt;&lt;a class="nav-link dropdown-toggle" href="#"&gt;{{default}}&lt;/a&gt;
              &lt;ul class="dropdown-menu"&gt;
                 &lt;li&gt;&lt;a ng-repeat="x in details" class="dropdown-item" href="{{x.href}}"&gt;{{x.name}}&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
             &lt;/li&gt;      
            &lt;/ul&gt;
         &lt;/div&gt;&lt;!--collapse navbar-collapse--&gt;
        &lt;/div&gt;
      &lt;/nav&gt;
      &lt;!-- jQuery first, then Popper.js, then Bootstrap JS --&gt;
      &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;!-- SmartMenus jQuery plugin --&gt;
      &lt;script type="text/javascript" src="../jquery.smartmenus.js"&gt;&lt;/script&gt;
      &lt;!-- SmartMenus jQuery Bootstrap 4 Addon --&gt;
      &lt;script type="text/javascript" src="../addons/bootstrap-4/jquery.smartmenus.bootstrap-4.js"&gt;&lt;/script&gt;
      &lt;?php
      session_destroy();
      ?&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>