Solved

PHP Tree Script Not Working

Posted on 2008-11-03
6
281 Views
Last Modified: 2011-10-19
I downloaded a script from DHTML Goodies and made no modifications
http://www.dhtmlgoodies.com/index.html?whichScript=folder_tree

But it gives me an error that I can't solve!
Parse error: syntax error, unexpected $end in dhtmlgoodies_tree.class.php on line 257

tree.zip
0
Comment
Question by:hankknight
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:MortenSlotKristensen
ID: 22866500
Could I possibly see your code in which your make use of the downloaded software?
0
 
LVL 6

Expert Comment

by:den4b
ID: 22866513
I just tried it on PHP 5.2.6, with sample files that are included in the original download - it works fine.

The only thing I did is renamed example file "dhtmlgoodies-tree.html" to "dhtmlgoodies-tree.php" (only because my php is configured to parse only *.php files) and opened it up through localhost...
0
 
LVL 6

Expert Comment

by:den4b
ID: 22866547
Also, line 257 in "dhtmlgoodies_tree.class.php" is actually the end of the file, with only "?>" closing tag on that line (from the original download). So you must have done some modifications which broke it...
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 16

Author Comment

by:hankknight
ID: 22866739
I just did a fresh download and it still gives me an error!  This is the code that I am using:
http://fds2432.googlepages.com/DHTMLtree.zip

If the code works on your server could you please upload a working version?
Thanks!
0
 
LVL 6

Accepted Solution

by:
den4b earned 500 total points
ID: 22866914
I don't really understand what you want me to upload, because the stuff from your last link just works, no errors of any kind... All I did is unpacked it to the local server...

Try setting up a new/clean web server, for example: WAMP (http://www.wampserver.com/en).
0
 
LVL 16

Author Comment

by:hankknight
ID: 22867355
Thanks for the help!

The problem was that the script uses short tags in a few places:
<? ?>

My server requires full tags:
<?php ?>
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question