Probleem met ?switch?variable?

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Stef Levolger

Stef Levolger

04/02/2004 16:45:00
Quote Anchor link
Ik heb een probleempje waardoor als ik nu naar mijn image uploader page ga dat ik niks te zien krijg, terwijl er eigenlijk een klein upload menuutje moet komen.

De code is:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
                    case 3:
                        $extlimit = "no"; //Do you want to limit the extensions of files uploaded
                        $limitedext = array(".torrent"); //Extensions you want files uploaded limited to.
                        $sizelimit = "yes"; //Do you want a size limit, yes or no?
                        $sizebytes = "100000"; //size limit in bytes
                        $dl = "http://www.psycho-project.com/wallpapers"; //url where files are uploaded
                        $absolute_path = "/home/psycho/public_html/wallpapers/"; //Absolute path to where files are uploaded
                        $websiteurl = "http://www.psycho-project.com"; //Url to you website
                        $websitename = "Psycho-Project";
                        
                        if($action=='0') {
                            echo"
                            <form method=POST action=$PHP_SELF?do=wallpapers&mode=3&action=1 enctype=multipart/form-data>
                            <p>File to upload:<br>
                            <input type=file name=file size=30>
                            <p><button TYPE=submit NAME=submit>
                            Upload
                            </button>
                            </form>";
                        }

                        if($action=='1') {
                            $dir = "wallpapers";
                            if ($file != "") {

                                if (file_exists("$absolute_path/$file_name")) {
                                    die("File already exists");
                                }

                                if (($sizelimit == "yes") && ($file_size > $sizebytes)) {
                                    die("File is to big. It must be $sizebytes bytes or less.");
                                }

                                $ext = strrchr($file_name,'.');
                                if (($extlimit == "yes") && (!in_array($ext,$limitedext))) {
                                    die("The file you are uploading doesn't have the correct extension.");
                                }

                                @copy($file, "$absolute_path/$file_name") or die("The file you are trying to upload couldn't be copied to the server");

                            } else {
                                die("Must select file to upload");
                            }

                            echo "
                            <html>
                            <head>
                            <title>File Uploaded</title>
                            </head>
                            <body>";
                            echo $file_name." was uploaded";
                            echo "<br>
                            <a href=$PHP_SELF?do=wallpapers&mode=3&action=0>Upload Another File</a>
                            </body>
                            </html>";
                        }
                        break;


De link naar de page met het probleem is:
http://www.psycho-project.com/main_index.php?do=wallpaper&mode=3&action=0
 
PHP hulp

PHP hulp

29/03/2024 14:32:08
 
Stef Levolger

Stef Levolger

05/02/2004 15:10:00
Quote Anchor link
niemand die iets weet op dit probleem? :(
 
B a s
Beheerder

B a s

06/02/2004 10:44:00
Quote Anchor link
Probeer eens:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
<?
if ($action == "") {
}

?>


Dit dus ipv:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
<?
if ($action == '0') {
}

?>


:)
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.