irkevin Posted October 18, 2007 Share Posted October 18, 2007 i have a code i made to make a little test.. im on a windows server.. <?php set_include_path('C:\hshome\tipa-mu\mu-anime.com\'); include("../test2.php"); echo "World"; ?> i get this error message and can't seem to find the solution. can anyone figure this for me please? Parse error: syntax error, unexpected $end in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 5 Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/ Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 <?php set_include_path("C:\hshome\tipa-mu\mu-anime.com\"); include "../test2.php"; echo "World"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372727 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 when i use the code you gave me.. i get this message Parse error: syntax error, unexpected '.' in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 3 honestlu, i don't find any errors in the code.. so why is it showing an error message? Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372731 Share on other sites More sharing options...
darkfreaks Posted October 18, 2007 Share Posted October 18, 2007 <?php set_include_path("C:\hshome\tipa-mu\mu-anime.com\""); include ("/test2.php"); echo "World"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372732 Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 <?php set_include_path("/try/using/backslashes"); include "../test2.php"; echo "Word"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372735 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 when i use this <?php set_include_path('C:/hshome/tipa-mu/mu-anime.com/'"); include "../test2.php"; echo "World"; ?> i get this message Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 3 Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372745 Share on other sites More sharing options...
darkfreaks Posted October 18, 2007 Share Posted October 18, 2007 <?php $path = 'C:/hshome/tipa-mu/mu-anime.com/'; set_include_path(get_include_path() . PATH_SEPARATOR . $path);?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372749 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 it's not working also darkfreaks ??? Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372751 Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 when i use this <?php set_include_path('C:/hshome/tipa-mu/mu-anime.com/'"); include "../test2.php"; echo "World"; ?> i get this message Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 3 You put another quote in there... Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372752 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 Parse error: syntax error, unexpected $end in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 5 even when removing the extra quote.. this is weird. wonder why it is not working .. tried it with backslashes also. but nothing Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372757 Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 <?php set_include_path("C:/hshome/tipa-mu/mu-anime.com"); include "../test2.php"; echo "World"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372759 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 when using backslashesm, it doesn't work either.. a simple code like this wont work :S thats weird Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372761 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 No one ??? why is this not working Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372768 Share on other sites More sharing options...
MadTechie Posted October 18, 2007 Share Posted October 18, 2007 Just some debugging Test #1 <?php set_include_path('C:\hshome\tipa-mu\mu-anime.com'); include("../test2.php"); echo "World"; ?> Test #2 <?php set_include_path('C:\hshome\tipa-mu\mu-anime.com'); #include("../test2.php"); echo "World"; ?> Test #3 <?php #set_include_path('C:\hshome\tipa-mu\mu-anime.com'); include("../test2.php"); echo "World"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372769 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 i wonder why it wont work tho.. :S Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372771 Share on other sites More sharing options...
MadTechie Posted October 18, 2007 Share Posted October 18, 2007 you did something wrong.. did you do the tests ? i have ran them and it runs fine! Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372774 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 i'm on a windows server.. and it doesn't seems to work.. test2.php is in the root. and test1.php is in a folder name test thats y i made include('../test2.php'); but it won't work on windows server.... Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372779 Share on other sites More sharing options...
MadTechie Posted October 18, 2007 Share Posted October 18, 2007 you did something wrong.. did you do the tests ? i have ran them and it runs fine! i have running on a windows server as well.. and they run fine.. did you run the tests ? and what where the results? Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372782 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 <?php set_include_path('C:\hshome\tipa-mu\mu-anime.com\'); include('../test2.php'); echo "World"; ?> when i use the code above, i get this Parse error: syntax error, unexpected '.' in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 3 i tried with backslashes as well, but no good.. tired removing the C: also. but not good.. why won't it work for me :S Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372784 Share on other sites More sharing options...
MadTechie Posted October 18, 2007 Share Posted October 18, 2007 Okay don't try the tests Good luck Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372786 Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 Why do you need an include path, just define it as you go. Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372790 Share on other sites More sharing options...
irkevin Posted October 18, 2007 Author Share Posted October 18, 2007 If i don't use the set_include_path, i get this error message Warning: main(../test2.php) [function.main]: failed to open stream: No such file or directory in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 2 Warning: main() [function.include]: Failed opening '../test2.php' for inclusion (include_path='.;c:\php4\pear') in C:\hshome\tipa-mu\mu-anime.com\test\test1.php on line 2 World Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372805 Share on other sites More sharing options...
marcus Posted October 18, 2007 Share Posted October 18, 2007 The file obviously doesn't exist. Just use a full path include "C:\folder\folder\test2.php"; Quote Link to comment https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372809 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.