Page 1 of 1

path.php in Sticky: File attachments is not working

Posted: Wed Jun 17, 2009 9:57 pm
by Henrie
The provided file path.php in the Sticky topic: File attachments not working - READ THIS! ( viewtopic.php?t=2604 ) is not working for me.
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /volume1/web/path.php on line 12
Changing line 12:

Code: Select all

echo 'Your root path to HESK is: '$path;
to (an extra . before $path)

Code: Select all

echo 'Your root path to HESK is: '.$path;
solves the problem .

The complete (working) code in the file is than:

Code: Select all

<html>

<head>
  <title></title>
</head>

<body>

<?php
$path = substr($_SERVER["SCRIPT_FILENAME"],0,-8);
$path = rtrim($path,'\/');
echo 'Your root path to HESK is: '.$path;
?>

</body>

</html>
Greetings,
Henrie

Posted: Thu Jun 18, 2009 6:54 am
by Klemen
Thanks for the head-ups Henrie, fixed now.