title: Can anyone help me to make require working?
body: <p>So I have 2 php files, one is calling function other is implementing the functions. </p>
  
  <p>In the one that is implementing the functions I call <strong>require("shares.php") - shares.php is file that calls the functions</strong> </p>
  
  <p>The problem is that, it's not seeing the functions, so I made a check to see if the functions exists and No, they do not exists ((. </p>
  
  <p>Please see here. </p>
  
  <p><strong>shares.php</strong></p>
  
  <pre><code>    &lt;!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'&gt; 
  &lt;html xmlns='http://www.w3.org/1999/xhtml'&gt; 
  &lt;head&gt; 
  &lt;meta http-equiv='Content-Type' content='text/html; charset=utf-8' /&gt; 
  &lt;title&gt;Shares&lt;/title&gt; 
  &lt;/head&gt; 
  
  &lt;body&gt; 
  &lt;?php
  
  if (function_exists('get_contents')) 
  { 
      if(function_exists('print_contents'))
      {
          $data = get_contents();
          print_contents($data);
      }
  }
  
  else
  {
      print("Not Found");
  }
  ?&gt;
  &lt;/body&gt; 
  &lt;/html&gt; 
  </code></pre>
  
  <p>And here are the implementation of functions.
       
  
  <pre><code>       if(isset($_GET['share']))
          {
              $conn = db_connect();
              if($_GET["newSorting"] == 1)
              {
  
                   $shares = get_shareSearch($conn, "company");
  
              }
  
              if($_GET["newSorting"] == 2)
              {
  
                  $shares = get_shareSearch($conn, "rate");
  
              }
              if($_GET["newSorting"] == 3)
              {
  
                   $shares = get_shareSearch($conn, "issue_date");
  
              }
  
              db_disconnect($conn);
              $contents = array('shares' =&gt; $shares);
              return $contents;
          }
  
          else
          {
              $conn = db_connect();
              $shares = get_share($conn);
              db_disconnect($conn);
              $contents = array('shares' =&gt; $shares);
              return $contents;
          }
  
      }
  
      function print_contents($contents) 
      {
  
          if(count($contents['shares']) == 0)
          {
              echo "&lt;script type = 'text/javascript'&gt;alert('Sorry but share is not found! Q_Q');&lt;/script&gt;";
  
          }
          else
          {
          ?&gt;    
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;th&gt;&lt;a href="share-company-links.php?companySort=true"&gt;Company Name&lt;/a&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;a href="share-company-links.php?rateSort=true"&gt;Rate&lt;/a&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;a href="share-company-links.php?issueSort=true"&gt;Issue date&lt;/a&gt;&lt;/th&gt;
                  &lt;/tr&gt;
          &lt;?php
  
          foreach ($contents['shares'] as $share) 
          {
              print "&lt;tr&gt;";
              $identifier = urlencode($share['COMPANY']);
              print "&lt;td&gt;&lt;a href='share-details.php?company={$identifier}'&gt;{$share['COMPANY']}&lt;/a&gt;&lt;/td&gt;";
              print "&lt;td&gt;{$share['RATE']}&lt;/td&gt;";
  
              $issue_date = $share['ISSUE_DATE'];
              $issue_date = $issue_date === NULL ? "&amp;lt; not available &amp;gt;" : $issue_date;
              print "&lt;td&gt;{$issue_date}&lt;/td&gt;";
              print "&lt;/tr&gt;";
          }
          ?&gt;
              &lt;/table&gt;
          &lt;?php
          }
      }
  
      require_once("shares.php");
  
      ?&gt;
  </code></pre>
  
  <p>The result will be <strong>Not Found</strong>.</p>