+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
Web Development Thread, PHP script help in Coding and Web Development; Hi guys Webman gave me a little php script that will display the contents of a folder in a nice ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445

    PHP script help

    Hi guys

    Webman gave me a little php script that will display the contents of a folder in a nice gui (thanks for that webman).

    When i use this on an Xampp install it works a treat when i use it on a IIS install i doesn't work.

    I was wondering if anyone can point out as to why not. I have posted my php.ini file and a copy of the script.

    Thanks allot
    Attached Files Attached Files

  2. #2

    Domino's Avatar
    Join Date
    Oct 2006
    Location
    Bromley
    Posts
    4,126
    Thank Post
    215
    Thanked 1,255 Times in 786 Posts
    Blog Entries
    4
    Rep Power
    505
    its probably due to webman's anti-windows tendancies.....

  3. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    Quote Originally Posted by Domino View Post
    its probably due to webman's anti-windows tendancies.....
    i would rather use apache myself but been forced into IIS.

  4. #4
    Friez's Avatar
    Join Date
    Dec 2006
    Posts
    839
    Thank Post
    22
    Thanked 22 Times in 21 Posts
    Rep Power
    23
    Is PHP installed for IIS is the obvious question? Acid test:

    <?php
    phpinfo();
    ?>

  5. #5

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    Yer its installed (that is why i have attached the php config file) and the server running a Joomla site.

    Thanks

    Z

  6. #6

    Join Date
    May 2006
    Posts
    159
    Thank Post
    5
    Thanked 10 Times in 5 Posts
    Rep Power
    18
    What error/s are you getting?

  7. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    just a blank screen

    cheers

    z

  8. #8
    kesomir's Avatar
    Join Date
    Mar 2008
    Location
    London
    Posts
    288
    Thank Post
    15
    Thanked 28 Times in 23 Posts
    Rep Power
    17
    Nifty script btw - all the images are encoded inside it and generated on the fly.

    Your fix:

    Code:
    in php.ini
    
    short_open_tag = [Off to On]
    tada.

  9. #9

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    638
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    @Domino - Oi! lol

    Just to make it clear I didn't create the script; I found it a while ago somewhere on the web, and haven't been able to find or remember the original source.

  10. #10

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    Quote Originally Posted by kesomir View Post
    Nifty script btw - all the images are encoded inside it and generated on the fly.

    Your fix:

    Code:
    in php.ini
    
    short_open_tag = [Off to On]
    tada.
    Thanks going to give that a try tomorrow.

    Quote Originally Posted by webman View Post
    @Domino - Oi! lol

    Just to make it clear I didn't create the script; I found it a while ago somewhere on the web, and haven't been able to find or remember the original source.
    Well thanks for forwarding it

  11. #11

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    Quote Originally Posted by kesomir View Post
    Nifty script btw - all the images are encoded inside it and generated on the fly.

    Your fix:

    Code:
    in php.ini
    
    short_open_tag = [Off to On]
    tada.
    Worked a treat, thanks

    Would anyone know how to change the order it lists the items in descending order?

    Thanks

  12. #12
    Friez's Avatar
    Join Date
    Dec 2006
    Posts
    839
    Thank Post
    22
    Thanked 22 Times in 21 Posts
    Rep Power
    23
    Errr, this relating to what? arrays? mysql? the ini file? some code snippet might be handy?

  13. #13

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    Quote Originally Posted by Friez View Post
    Errr, this relating to what? arrays? mysql? the ini file? some code snippet might be handy?
    What? there is no datbase or anything the index.php file is as it is.

    Z

  14. #14
    Friez's Avatar
    Join Date
    Dec 2006
    Posts
    839
    Thank Post
    22
    Thanked 22 Times in 21 Posts
    Rep Power
    23
    Ah right, didn't spot that. I would simply traverse the array starting from the other way around.

    Without actually installing or testing it I'd say you need to re-arrange the loop:

    for(var i=a;i<b&&i<(_files.length+_dirs.length);++i)

    Also while this is a nice little script, variable naming is pretty ugly and I cannot be bothered to decypher it.
    O_o

    You'dd need to make the predicate become the intialisation i=_files.length + _dirs.length and the addition become subtraction:
    i-- and i>0

    but not sure what the i<b is all about.

    Thank god I rolled my own piece of PHP for doing this sort of thing :]

    Edit:
    Actually, from delving a little more seems he's already rolled a sort function for different fields (name, size, date e.t.c) in there. Why do you actually need to modify anything? or does it need to be descending by default? o_O
    Last edited by Friez; 15th August 2008 at 02:58 PM.

  15. #15

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,852
    Thank Post
    877
    Thanked 1,681 Times in 1,460 Posts
    Blog Entries
    12
    Rep Power
    445
    That post up there didn't mean to sound sharp

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Looking for PHP blog script which does not require database
    By ajbritton in forum Web Development
    Replies: 10
    Last Post: 9th December 2010, 07:50 AM
  2. PHP script to downlod mail
    By russdev in forum Web Development
    Replies: 2
    Last Post: 20th January 2008, 03:22 PM
  3. Simple PHP script for notes about students?
    By ChrisS in forum Scripts
    Replies: 1
    Last Post: 29th November 2007, 10:25 AM
  4. PHP IMAP check mail script
    By netadmin in forum Web Development
    Replies: 2
    Last Post: 22nd April 2007, 03:47 AM
  5. PHP flat file database script
    By ajbritton in forum Web Development
    Replies: 3
    Last Post: 26th October 2006, 08:51 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •