User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 429,763 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,893 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

$_server['script_name']

Join Date: Apr 2008
Posts: 9
Reputation: phploveisgood is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
phploveisgood phploveisgood is offline Offline
Newbie Poster

$_server['script_name']

  #1  
May 9th, 2008
Please I need some help!

When I am developing, these code below works fine:

  1. <?php
  2. if($_SERVER['SCRIPT_NAME'] == '/aktuelle seite/index.php')
  3. {
  4. $style_home = 'style="background-color: #6C674F"';
  5. }
  6. ?>
  7. <ul>
  8.  
  9. <li class="linkLevel01"><a href="index.php" class="homy"<?php echo $style_home ?>>Home</a></li>


But, when I put on the server :

  1. <?php
  2. if($_SERVER['SCRIPT_NAME'] == '/bobo/index.php')
  3. //"bobo" is the name of the folder on my server]
  4. {
  5. $style_home = 'style="background-color: #6C674F"';
  6. }
  7. ?>
  8. <ul>
  9.  
  10. <li class="linkLevel01"><a href="index.php" class="homy"<?php echo $style_home ?>>Home</a></li>

It won't work.

Please help me out.

Best regards

Max
Last edited by peter_budo : May 11th, 2008 at 1:03 pm. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 3:32 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC