Jump to content

unexpected $end


irkevin

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372745
Share on other sites

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...

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372752
Share on other sites

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";
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372769
Share on other sites

<?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

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372784
Share on other sites

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/73872-unexpected-end/#findComment-372805
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.