Re: php string syntax question with html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try this:

'<link href='.$_SERVER['DOCUMENT_ROOT']
.'/wp-content/themes/themestyle/white.css" rel="stylesheet" type="text/css"
/>';

On Wed, Mar 10, 2010 at 7:15 PM, David Mehler <dave.mehler@xxxxxxxxx> wrote:

> Hello,
> I've got what is probably a very simple question, probably something
> having to do with quotes single vs. double, but the answer is
> frustrating elusive, I keep getting a syntax error.
> I'm trying to customize a wordpress theme a friend sent me. We're both
> using apache as web server and php5, but his has got to be configed
> differently than mine. The theme deals with multiple stylesheet
> inclusion among other things. The original line is:
>
> $styleSheets[0]["sheet"]='<link
> href="/wp-content/themes/theme/style/white.css" rel="stylesheet"
> type="text/css" />';
>
> That code puts the <link in the head portion of the document. The
> issue is his / is not where mine is, i'm using a virtual host and need
> a line similar to this:
>
> $styleSheets[0]["sheet"]='<link href=$_SERVER['DOCUMENT_ROOT'] .
> "/wp-content/themes/theme/style/white.css" rel="stylesheet"
> type="text/css" />';
>
> I've tried this with both double quotes before the <link declaration,
> but keep getting a parse error.
> Help appreciated.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux