PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| <?php $name = htmlspecialchars($_GET['name']); $website = htmlspecialchars($_GET['site']); $text = htmlspecialchars($_GET['text']); if ($name) { if ($text) { $write = '<fieldset><legend>Name: '.$name.' (Website: '.$website.')</legend>'.$text.'</fieldset>'; $filename = 'source/include/data/guestbook.txt'; $guestbook = fopen($filename,'w'); fputs($write,$guestbook); fclose($guestbook); echo 'You have succesfully signed my guestbook'; } else { echo 'Please fill out the text form.'; } } else { echo 'Please fill out the name form'; } ?> |
hij geeft deze errors, maar ik gebruik bijna dezelfde manier van code voor mijn visitors counter.. wat is er mis?
Warning: fopen(source/include/data/guestbook.txt): failed to open stream: No such file or directory in /home/airliner/public_html/gijs/source/content/signgb.php on line 11
Warning: fputs(): supplied argument is not a valid stream resource in /home/airliner/public_html/gijs/source/content/signgb.php on line 12
Warning: fclose(): supplied argument is not a valid stream resource in /home/airliner/public_html/gijs/source/content/signgb.php on line 13
You have succesfully signed my guestbook