Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

php include error...


ghost's Avatar
0 0

I dont know whats the problem. Hopefully one of you can help me.

here's my error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\includingfile\include()\index.php on line 2

include($_SERVER['DOCUMENT_ROOT'] "/myfile.php");
?>

Thanks in advance


BIBER's Avatar
Banned
0 0

Try this:

include($_SERVER['DOCUMENT_ROOT'].'/myfile.php');
?>```
dot

ghost's Avatar
0 0

I did try it. I still get the exacly the same error

Thanks for the help though


ghost's Avatar
0 0
include($_SERVER['document_ROOT'])."/myfile.php";
?>```

document_ROOT isn't enclosed properly.

ghost's Avatar
0 0

i could be wrong, but isnt this vulnerable to RFI/LFI?


ghost's Avatar
0 0

bigggnick wrote: i could be wrong, but isnt this vulnerable to RFI/LFI?

i thought it was a predefined variable; which defeats against that sort of R/LFI


ghost's Avatar
0 0

ok, i dont really know much about RFI/LFI, just making sure you were careful


richohealey's Avatar
Python Ninja
0 0

<?php include($_SERVER['document_ROOT']. $_GET['page'] ) ; ?>

would be vulnerable