Jump to content

DW Blind To The Script


Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>menu_test</title>

</head>

<body>
<?php 
$menu = <<<MENU 
<ul id="nav"> 
    <li><a href="/" title="Where the heart is">Home</a></li> 
    <li><a href="/archives/" title="Things that have passed.">Archives</a></li> 
    <li><a href="/about/" title="All about Matt">About</a></li> 
    <li><a href="/photos/" title="It's the 'photo' in Matt">Photos</a></li> 
    <li><a href="/music/" title="The food of love">Music</a></li> 
    <li><a href="/scripts/" title="Free (as in beer and speech) code">Scripts</a></li> 
    <li><a href="/jazzquotes/" title="Great quotes from amazing musicians. More in the future.">Jazz Quotes</a></li> 
    <li><a href="/toys/" title="Make me tick: Reviews of various electronics I own or have come into contact with.">Toys</a></li> 
    <li><a href="/xml/" title="Syndicate the content here. Get Matt to-go.">Syndicate</a></li> 
    <li><a href="/portal/" title="My personal start page, has my blogroll and links to interesting sites">Portal</a></li> 
    <li><a href="/zeitgeist/" title="A google of random stats about the website">Zeitgeist</a></li> 
    <li><a href="/contact/" title="Reach out and touch somebody. How to get in contact with me, also has GPG key and geek code.">Contact</a></li> 
</ul> 
MENU; 

$lines = split("\n", $menu); 
foreach ($lines as $line) { 
    $current = false; 
    preg_match('/href="([^"]+)"/', $line, $url); 
    if (substr($_SERVER["REQUEST_URI"], 0, 5) == substr($url[1], 0, 5)) { 
        $line = str_replace('<a h', '<a id="current" h', $line); 
        } 
    echo $line."\n"; 
}
?>
</body>
</html>

 

The above script from Intellemenu is being missed by DW, I get server not recognizing .php, or no scripts or testing server not running, a simple echo works, so it's not the server configuration, which is local. What gives? Reading the url would provide more insight into the intended function.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.