Dhira Posted April 12, 2006 Share Posted April 12, 2006 I'm getting an error when I reference a url within an include - probably because the url itself is an include.[code]<?php include("<? include("/home/lifeins/public_html/root.php"); ?>/linktator/linktator.php>[/code] where root.php is code for the server url string.What is the proper code to reference this?(The error is "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in...") Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 12, 2006 Share Posted April 12, 2006 I dont think you can do an include within an include! Why are you doiung an include within an include for? Quote Link to comment Share on other sites More sharing options...
Dhira Posted April 12, 2006 Author Share Posted April 12, 2006 I'm doing an include within an include as a starting point. I know its wrong - after all it gives an error, I pasted it to show what I am[i] trying[/i] to do.The reason is....the second include [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<? include("/home/lifeins/public_html/root.php"); ?>[/quote] is for code that shows the url of the site (http://www.domain.com). By itself it shows the url of the domain correctly because 'root.php' has the correct php string for the url.Now, what I want to do is [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?php include ("http://www.domain.com/linktator/linktator.php)" ?>[/quote] however, since I [b]already[/b] have code that automatically references the url (in root.php) I would like to somehow reference root.php which is located in the 'public_html' folder.So what would be the correct way to reference the 'root.php' file without having to type in the actual url?(The reason is because there are many domains I need to do this for). Quote Link to comment 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.