>>  Site Map >>  Forums >>  Installation 6x

Forum module - topics in forum:



Installation 6x - Discussions regarding PHP-Nuke Installation and Configuration.



[Resolved] parse error when editing a link

What i'm trying to do is edit this link in my theme.php file

."<a href=\"ubbthreads\"><img border=\"0\" src=\"themes/DeepBlue/images/forums.gif\" width=\"140\" height=\"18\"></a>"


when i try to amend the link to "ubbthreads/index.php" i get a parse error.
I dont want it to be just "ubbthreads\"


can anyone help?
thanks!






The \ charachter is a special charachter in PHP and is used to ignore the charachter that follows it for example on any line that is echoed you need ot have something like the following structure
Code: :
 echo " <-- Opening Mark --------- Closing Mark --> ";

Now in your line you have some " within the opening and closing marks so in order for PHP to understand it corecltly we use \" this means that the " after the \ is ignored and not the closing mark. So in your line
Code: :
."<a href=\"ubbthreads\"><img border=\"0\" src=\"themes/DeepBlue/images/forums.gif\" width=\"140\" height=\"18\"></a>"

That is parsed corectly as all the " that are not either opening or closing marks have a \ in front of them but when you did:
Code: :
."<a href=\"ubbthreads/index.php"><img border=\"0\" src=\"themes/DeepBlue/images/forums.gif\" width=\"140\" height=\"18\"></a>"

I'd say you might have not put the \ on the " after the .php so try
Code: :
."<a href=\"ubbthreads/index.php\"><img border=\"0\" src=\"themes/DeepBlue/images/forums.gif\" width=\"140\" height=\"18\"></a>"

Hope that helps you understand that a little more, for more info on PHP use the php link in my signature below. The above line should work if not give me the parse error and a few lines before and after the error line number and state what line is the one that has the error on it






that did the job!
i tried everything i knew apart from that!
thanks very much for your detailed explanation, appreciate it Smile




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS