Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6899097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:22:44+00:00 2026-05-27T07:22:44+00:00

I have a strange issue going on. It may be server related, but I

  • 0

I have a strange issue going on. It may be server related, but I don’t know what to look for.

I have a .php page with a few Virtual Includes:

<?php virtual ("nav.shtml"); ?>

…throughout it. I have also a parser that is displaying XML data in a table form.

The parser works with the standard:

 <?php include ('parser.php'); ?>

…however, if I have the Virtual above the include, the parser doesn’t work. Or at least it will not “find the file” however, the file is there and it works ABOVE the virtual, displaying it fine…

For example, this works:

<?php include ('parser.php'); ?>
<?php virtual ('file.shtml'); ?>

This doesn’t:

<?php virtual ('file.shtml'); ?>
<?php include ('parser.php'); ?>

Am I missing something here?

Here is the index.shtml page code:

<?php virtual ("nav.shtml"); ?>
     <div id="sortabletable">
                      <table id="myTable" class="tablesorter">
                        <thead>
                          <tr>
                            <th>Subject</th>
                            <th>Committee</th>
                            <th>Witness</th>
                            <th>Date</th>
                            <th>Bill</th>
                            <th>Link</th>
                          </tr>
                        </thead>
                        <tbody>
                            <?php include('parser.php'); ?>
                        </tbody>
                      </table>
                    </div>
     <?php virtual ("footer.shtml"); ?>

Here is the parser code:

<?php 
$xml_file = "test.xml"; 

$xml_subject_key = "*TESTIMONIES*CONGRESS*SUBJECT"; 
$xml_committee_key = "*TESTIMONIES*CONGRESS*COMMITTEE"; 
$xml_witness_key = "*TESTIMONIES*CONGRESS*WITNESS"; 
$xml_date_key = "*TESTIMONIES*CONGRESS*DATE"; 
$xml_bill_key = "*TESTIMONIES*CONGRESS*BILL"; 
$xml_link_key = "*TESTIMONIES*CONGRESS*LINK"; 

$congress_array = array(); 

$counter = 0; 
class xml_story{ 
    var  $subject, $committee, $witness, $date, $bill, $link; 
} 

function startTag($parser, $data){ 
    global $current_tag; 
    $current_tag .= "*$data"; 
} 

function endTag($parser, $data){ 
    global $current_tag; 
    $tag_key = strrpos($current_tag, '*'); 
    $current_tag = substr($current_tag, 0, $tag_key); 
} 

function contents($parser, $data){ 
    global $current_tag, $xml_subject_key, $xml_committee_key, $xml_witness_key, $xml_date_key, $xml_bill_key, $xml_link_key, $counter, $congress_array; 
    switch($current_tag){ 
        case $xml_subject_key: 
            $congress_array[$counter]->subject = $data; 
            break; 
        case $xml_committee_key: 
            $congress_array[$counter]->committee = $data; 
            break; 
        case $xml_witness_key: 
            $congress_array[$counter]->witness = $data; 
            break; 
        case $xml_date_key: 
            $congress_array[$counter]->date = $data; 
            break; 
        case $xml_bill_key: 
            $congress_array[$counter]->bill = $data; 
            break; 
        case $xml_link_key: 
            $congress_array[$counter]->link = $data; 
            $counter++; 
            break; 
    } 
} 

$xml_parser = xml_parser_create(); 

xml_set_element_handler($xml_parser, "startTag", "endTag"); 

xml_set_character_data_handler($xml_parser, "contents"); 

$fp = fopen($xml_file, "r") or die("Could not open file"); 

$data = fread($fp, filesize($xml_file)) or die("Could not read file"); 

if(!(xml_parse($xml_parser, $data, feof($fp)))){ 
    die("Error on line " . xml_get_current_line_number($xml_parser)); 
} 

xml_parser_free($xml_parser); 

fclose($fp); 

 // A simple for loop that outputs our final data. 
 //echo sizeof($congress_array);
for($x=0; $x<count($congress_array); $x++){ 
    echo "<tr><td scope='row'>" . $congress_array[$x]->subject . "</td>";  
    echo "<td>" . $congress_array[$x]->committee . "</td>"; 
    echo "<td>" . $congress_array[$x]->witness . "</td>"; 
    echo "<td>" . $congress_array[$x]->date . "</td>"; 
    echo "<td>" . $congress_array[$x]->bill . "</td>"; 
    echo '<td><a href="'. $congress_array[$x]->link .'"><img src="download-icon.png" width="20" height="20" alt="' . $congress_array[$x]->subject . '"/></a></td></tr>'; 
} 
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:22:45+00:00Added an answer on May 27, 2026 at 7:22 am

    If you use Virtual and Includes in some cases you will need to split your includes code and run it at the top of your .shtml file. Then have the output includes where you need the output. Worked for my issue.

    Thanks!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
Strange issue. I have SQL Server running on an EC2 box that I can
Have following strange issue, have 7 lines (same classes) but after 2 lines it's
I have this strange issue going on with my CSS on my site, and
I have been going through this strange issue and have no clue what's going
I have a very strange issue going on here. It's only occurring on Internet
I have this strange issue with my web app. You see, I'm using jQuery
I have a strange issue (at least for me :)) with the MySQL's locking
I have a strange issue that has arisen recently: Whenever I enter text, even
I have a strange issue with jQuery's hover, addClass $(document).ready(function(){ $('#selectable li').hover( function(){ $(this).addClass('selecting',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.