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

  • SEARCH
  • Home
  • 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 9249137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:07:01+00:00 2026-06-18T10:07:01+00:00

i have a really odd thing going here. I have a single php file

  • 0

i have a really odd thing going here. I have a single php file that i have called index2.php (i’ll give the code below) I have this file in two different directories, when i load then both in my web browsers i get two different outputs. Can someone please tell me how this is possible!?

 <?php
 //////////////////////////////////////////////////////////////////
 // DJ Status v3.0                                               //
 // ©2012 Joseph Scocca                                          //
 //////////////////////////////////////////////////////////////////
 include ("config.php"); // include the settings to connect to DB and ShoutCast
 include ("header.php"); // include the Header info
 if ($scsuccs!=1) { // Check is we can connect to ShoutCast Server
 if($streamstatus == "1"){ // Is the Stream broadcasting 
 if (isset($dj)) { // is there a DJ in the DB connected

 // Open Container and Column 1
 echo "<div id=\"container\"><div id=\"column-1\">";

 // connected DJ have a Avatar
 if (isset($djavatar) && $djavatar) { echo "
 <div id=\"avatarpic\"><img src=\"$djavatars/$djavatar\" /></div>"; }    

 // Close Column 1 Open Column 2 Make the Div Stats and start showing data
 echo "</div><div id=\"column-2\">
 <div id=\"stats\">
 <div><strong><span>Now playing</span></strong></div>";


 // if the song title is longer than 17 characters then scroll the title
 if (strlen($artisttitle[1]) > 17) { echo "
 <div><marquee behavior=\"scroll\" scrollamount=\"1\" direction=\"left\" width=\"160\">$artisttitle[1]</marquee>    </div>";

 // if the artist is longer than 16 characters then scroll the artists
 if (strlen($artisttitle[0]) > 16) { echo "
 <div><strong>By </strong><marquee behavior=\"scroll\" scrollamount=\"1\" direction=\"left\" width=\"135\">$artisttitle[0] </marquee></div>
 <div><strong>On Air</strong> $djname </div>";

 // if the artist is short than or equals 16 characters then just display it as text
 } else if (strlen($artisttitle[0]) <=16) { echo "
 <div><strong>By </strong>$artisttitle[0]<div>
 <strong>On Air</strong> $djname </div>";}

 } else if (strlen($artisttitle[1]) <= 17) {    
 echo "<div>$artisttitle[1]</div>";
 //if the song title is less than 17 characters then just display it as text

 // if the artist is longer than 16 characters then scroll the artists
 if (strlen($artisttitle[0]) > 16) { echo "
 <div><strong>By </strong><marquee behavior=\"scroll\" scrollamount=\"1\" direction=\"left\" width=\"135\">$artisttitle[0]</marquee></div><div><strong>On Air</strong> $djname </div>";
  // if the artist is short than or equals 16 characters then just display it as text
 } else if (strlen($artisttitle[0]) <=16) { echo "
 <div><strong>By </strong>$artisttitle[0]<div><strong>On Air</strong> $djname </div>";
            }
    } 
 echo "</div></div></div> // Close Column 2, Stats, and Container.
 <div id=\"column-3\"><div id=\"social\">"; // Open Column 3 and social
    if (isset($address) && $address) {echo "
 <a href=\"$address\" target=\"_blank\">
 <img style=\"height:25px;width:94px;\" src=\"images/request.png\" border=\"0\" />
 </a><br>";} //  requestline 

 if (isset($djname1) && $djname1) {echo "
 $djname1";} // Display the DJ Name (for shows that Have a Co Host.)
 if (isset($twitter) && $twitter) {echo "
 <a href=\"http://www.twitter.com/$twitter\" target=\"_blank\">
 <img src=\"images/twitter.png\" border=\"0\" /></a>";}
  // does the  DJ have a Twitter, if so display it

 if (isset($facebook) && $facebook) {echo "
 <a href=\"http://www.facebook.com/$facebook\" target=\"_blank\">
 <img src=\"images/facebook.png\"  border=\"0\"/></a>"; }
 // does the  DJ have a Facebook, if so display it

 if (isset($email) && $email) {echo "
 <a href=\"mailto:$email\"><img src=\"images/email.png\"  border=\"0\"/></a>";}
  // does the DJ have a Email, if so display it

 // if the Connected DJ has a Co Host do the following.
 if (isset($djname2) && $djname2) {echo "
 <br />$djname2";} // Display the Co Host Name

 if (isset($twitter2) && $twitter2) {echo "
 <a href=\"http://www.twitter.com/$twitter2\" target=\"_blank\">
 <img src=\"images/twitter.png\" border=\"0\" /></a>";} // Co Host Tiwtter 

 if (isset($facebook2) && $facebook2) {echo "
 <a href=\"http://www.facebook.com/$facebook2\" target=\"_blank\">
 <img src=\"images/facebook.png\"  border=\"0\"/></a>"; } // Co Host  Facebook 

 if (isset($email2) && $email2) {echo "<a href=\"mailto:$email2\">
 <img src=\"images/email.png\" border=\"0\" />";} //  Co Host email 

 echo "</div></div>"; //Closing of the Social Div and Column 3

 } else { // when the current dj is not in the system do the following

 echo "<div id=\"container\"><div id=\"column-1\"><div id=\"avatarpic\">
 <img src=\"$djavatars/default.png\" /></div>";
  // Open Container, Column 1, and avatar pic. Display the default avatar 
 echo "</div><div id=\"column-2\">";   // Close Column 1, Open Column 2

 echo "<div id=\"stats\"><div><strong><span>Now playing</span></strong></div>";
 // Make the Div Stats and start showing data

 // if the song title is longer than 25 charaters then scroll the title
 if (strlen($artisttitle[1]) > 17) { echo "
 <div><marquee behavior=\"scroll\" scrollamount=\"1\" direction=\"left\" width=\"160\"> $artisttitle[1]  </marquee></div><div><strong>By:</strong> $artisttitle[0]</div>";

 } else if (strlen($artisttitle[1]) <= 17) {echo "
 <div>$artisttitle[1]</div><div><strong>By:</strong> $artisttitle[0]</div></div>";}   
 //if the song title is less than 25 charaters then just display it as text

 echo "</div>"; } // Close Column 2

 } else {echo "<b><span style=\"color:#FFF;\">Trek Radio is currently experiencing
 <br />technical difficulties.<br /> Please check again later. (Error 100)</b>
 </span>";} // Error 100 connetion error to the DB

 } else {echo "<b><span style=\"color:#FFF;\">Trek Radio is currently experiencing
 <br />technical difficulties.<br /> Please check again later. (Error 200)</b>
 </scpan>";} // Error 200 connection error to shoutcast
 echo "</div>"; // Close Container
 ?>

Now this script should give my the current song title and dj that is currently on the air. What I dont get is, when you go to http://www.surayamedia.com/onair_tr/index2.php and http://www.surayamedia.com/trdjs/index.php the output are different. How can this be when it is the same exact file? They are just placed in two different directories! I don’t get it. All I am trying to do is to move the script to a different folder on the server!

Thank you for who ever can figue out what can be done to fix this!

  • 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-06-18T10:07:03+00:00Added an answer on June 18, 2026 at 10:07 am

    it was a server issue not a code issue.

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

Sidebar

Related Questions

Something really odd going on here, and I have gone round in circles trying
I am having a really odd issue. I have a Phonegap 2.0 app that
I have been having these really odd problems with Visual Studio 2010. At this
I have run into a really odd bug with FF3.5.9 (and potentially lower) where
I am having an odd problem with jQuery 1.5.2 in Chrome. I have code
I have a small script here that I need some help with: for song
So I have an odd little problem with the hashing function in PHP. It
I just saw a very odd thing, I have a co-worker who has their
I have a script that runs a PHP MySQL query with information gathered via
I am building a COM addin using the office interops. I have code that

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.