path.php in Sticky: File attachments is not working

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

path.php in Sticky: File attachments is not working

Post 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
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for the head-ups Henrie, fixed now.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply