tsuby Posted July 3, 2013 Share Posted July 3, 2013 (edited) Let's say I'm on the following page: localhost/articles/25/article-title which is treated like view.php?article_id=$id When I'm writing the HTML code for the view.php page, I want to link it to a CSS file, but even though view.php is in the same folder as index.php is, the link is not working(it seems to me that it might be because of the friendly URL, but I'm probably wrong). In this case, how can I link the CSS and any other link correctly? Edited July 3, 2013 by tsuby Quote Link to comment https://forums.phpfreaks.com/topic/279835-linking-problem/ Share on other sites More sharing options...
cpd Posted July 3, 2013 Share Posted July 3, 2013 (edited) Link the file with a <link ... /> tag and make sure you're link is written using the public domain not the file system. e.g. a website in /home/user_account/public_html/some/css/main.css would require a /some/css/main.css in the href attribute of the <link ...> tag. Edited July 3, 2013 by cpd Quote Link to comment https://forums.phpfreaks.com/topic/279835-linking-problem/#findComment-1439344 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.