| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #26 (permalink) |
| Professional Monkey Join Date: Jul 2005 Location: Escaped from the zoo
Posts: 907
![]() ![]() | does "uploads\\" not work?
__________________ Webmaster Words |
| |
| | THREAD STARTER #27 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | also, if i post a link related to www.ISC.tk dont click it, i havent got the domain set up yet. someone help me with the search page please here it is: PHP Code:
Last edited by Mikor; 08-09-2005 at 11:45 AM.
|
| |
| | #29 (permalink) |
| Professional Monkey Join Date: Jul 2005 Location: Escaped from the zoo
Posts: 907
![]() ![]() | you dont need the !==false at all PHP Code: where did you get this script from it is possibly the messiest coding i've ever seen, lol. no offenece intended
__________________ Webmaster Words
Last edited by Amnezia; 08-09-2005 at 12:47 PM.
|
| |
| | #30 (permalink) |
| NamePros Member Join Date: Jan 2005 Location: Texas USA
Posts: 71
![]() | http://us3.php.net/opendir ![]() BTW Amnezia, your file extension check wont work for ALL files. Some files contain periods before the file extension, therefore, it will check everything AFTER that... Try this code. It reverses the string and takes everything before the first period, then reverses it back to give you the correct file extension ????: NamePros.com http://www.namepros.com/showthread.php?t=114050 PHP Code:
__________________ I wonder... |
| |
| | #31 (permalink) | ||||
| Professional Monkey Join Date: Jul 2005 Location: Escaped from the zoo
Posts: 907
![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=114050 the best way to do it is to check the mime types of the files
__________________ Webmaster Words | ||||
| |
| | #32 (permalink) |
| NamePros Member Join Date: Jan 2005 Location: Texas USA
Posts: 71
![]() | I actually use both... Check file extension and MIME type. This script works (probably not best methods on some parts, but still works nonetheless )PHP Code:
__________________ I wonder... |
| |
| | THREAD STARTER #33 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | thanks for all the help everyone, ive just got one more problem: PHP Code:
Last edited by Mikor; 08-09-2005 at 03:16 PM.
|
| |
| | #34 (permalink) |
| NamePros Webmaster ![]() ![]() ![]() Join Date: Feb 2003
Posts: 12,930
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Try PHP Code: ????: NamePros.com http://www.namepros.com/showthread.php?t=114050 PHP Code: |
| |
| | #35 (permalink) |
| Eating Pie Join Date: Nov 2004 Location: Canada
Posts: 2,272
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | The code I gave you nees to be edited to fit your script. Since the form field name is file insted of the regular userfile you will have the change $_FILES['userfile'].... to $_FILES['file']... Other than that I can't see a problem why the code I didn't give you won't work.. It worked for me.
__________________ I feel old. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 12:35 PM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 10:09 AM |
| PHP Error | Unknown | Programming | 3 | 01-25-2005 10:06 PM |