Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Go Back   EduGeek.net Forums > Coding and Web Development > Web Development
Reply
 
LinkBack Thread Tools Search Thread Language
Sponsored Links
Old 11-08-2008, 12:31 PM   #1
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default 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
File Type: txt php.txt (48.8 KB, 28 views)
File Type: txt index.txt (17.5 KB, 36 views)
  Reply With Quote
Old 11-08-2008, 01:06 PM   #2
 
Domino's Avatar
 
Join Date: Oct 2006
Location: Hastings
Posts: 1,098
uk uk sussex
Thanks: 12
Thanked 69 Times in 57 Posts
Blog Entries: 4
Rep Power: 19 Domino is just really niceDomino is just really niceDomino is just really niceDomino is just really nice
Send a message via MSN to Domino
Default

its probably due to webman's anti-windows tendancies.....
  Reply With Quote
Old 12-08-2008, 01:09 PM   #3
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

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.
  Reply With Quote
Old 14-08-2008, 02:22 PM   #4
 
Friez's Avatar
 
Join Date: Dec 2006
Posts: 754
Thanks: 13
Thanked 9 Times in 9 Posts
Rep Power: 9 Friez will become famous soon enoughFriez will become famous soon enough
Default

Is PHP installed for IIS is the obvious question? Acid test:

<?php
phpinfo();
?>
  Reply With Quote
Old 14-08-2008, 04:47 PM   #5
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

Yer its installed (that is why i have attached the php config file) and the server running a Joomla site.

Thanks

Z
  Reply With Quote
Old 14-08-2008, 04:53 PM   #6
 
klawd's Avatar
 
Join Date: May 2006
Posts: 137
Thanks: 4
Thanked 2 Times in 1 Post
Rep Power: 6 klawd is on a distinguished road
Default

What error/s are you getting?
  Reply With Quote
Old 14-08-2008, 05:11 PM   #7
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

just a blank screen

cheers

z
  Reply With Quote
Old 14-08-2008, 07:57 PM   #8
 
kesomir's Avatar
 
Join Date: Mar 2008
Location: London
Posts: 173
uk uk city of london
Thanks: 8
Thanked 12 Times in 11 Posts
Rep Power: 4 kesomir will become famous soon enough
Default

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.
  Reply With Quote
Old 14-08-2008, 11:15 PM   #9
 
webman's Avatar
 
Join Date: Nov 2005
Location: Bishop Auckland, County Durham
Posts: 5,523
uk uk durham city
Thanks: 90
Thanked 79 Times in 63 Posts
Blog Entries: 1
Rep Power: 35 webman is a glorious beacon of lightwebman is a glorious beacon of lightwebman is a glorious beacon of lightwebman is a glorious beacon of lightwebman is a glorious beacon of lightwebman is a glorious beacon of light
Send a message via MSN to webman Send a message via Skype™ to webman
Default

@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.
  Reply With Quote
Old 14-08-2008, 11:16 PM   #10
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

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
  Reply With Quote
Old 15-08-2008, 11:56 AM   #11
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

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
  Reply With Quote
Old 15-08-2008, 02:00 PM   #12
 
Friez's Avatar
 
Join Date: Dec 2006
Posts: 754
Thanks: 13
Thanked 9 Times in 9 Posts
Rep Power: 9 Friez will become famous soon enoughFriez will become famous soon enough
Default

Errr, this relating to what? arrays? mysql? the ini file? some code snippet might be handy?
  Reply With Quote
Old 15-08-2008, 02:13 PM   #13
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

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
  Reply With Quote
Old 15-08-2008, 02:36 PM   #14
 
Friez's Avatar
 
Join Date: Dec 2006
Posts: 754
Thanks: 13
Thanked 9 Times in 9 Posts
Rep Power: 9 Friez will become famous soon enoughFriez will become famous soon enough
Default

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; 15-08-2008 at 02:58 PM..
  Reply With Quote
Old 15-08-2008, 02:39 PM   #15
 
FN-GM's Avatar
 
Join Date: Jun 2007
Location: Rochdale, Lancashire
Posts: 4,811
uk
Thanks: 156
Thanked 156 Times in 150 Posts
Rep Power: 37 FN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to beholdFN-GM is a splendid one to behold
Send a message via Skype™ to FN-GM
Default

That post up there didn't mean to sound sharp
  Reply With Quote
Reply

Register now for FREE and post messages!


Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
Birthday:      
Image Verification
  I agree to forum rules 

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script to downlod mail russdev Web Development 2 20-01-2008 04:22 PM
Simple PHP script for notes about students? ChrisS Scripts 1 29-11-2007 11:25 AM
PHP IMAP check mail script claridentech Web Development 2 22-04-2007 03:47 AM
PHP flat file database script ajbritton Web Development 3 26-10-2006 08:51 PM
Looking for PHP blog script which does not require database ajbritton Web Development 9 10-10-2006 08:26 AM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 02:53 PM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright EduGeek.net