Mini Map
Code (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
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
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
<?php
require_once (iets);
Header("Content-type: image/png"); // set as png
mysql_connect("$host", "$username", "$password")or die("cannot connect");
// Image Size
$height = 247;
$width = 247;
$im = ImageCreate($width, $height);
ImageAntiAlias($im, true);
// Colors
$grass = ImageColorAllocate($im, 67,154,67);
$dorp = ImageColorAllocate($im, 255,0,0);
$bgcolor = ImageColorAllocate($im, 39,104,39);
$white = ImageColorAllocate($im, 255, 0, 0);
ImageFill($im, 0, 0, $bgcolor);
$size = 5;
$size2 = $size + 1;
$query = "SELECT * FROM `een tabel`";
$result = mysql_query($query);
$userarray;
while($row = mysql_fetch_array($result))
{
$userarray[$row['x'] . ',' . $row['y']] = true;
}
for($b=0; $b<=40; $b++)
{
for($i=0; $i<=40; $i++)
{
if ($userarray[$i . ',' . $b] == true)
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $dorp);
}
else
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $grass);
}
}
}
imagejpeg($im, '', 100);
imagedestroy($im);
?>
require_once (iets);
Header("Content-type: image/png"); // set as png
mysql_connect("$host", "$username", "$password")or die("cannot connect");
// Image Size
$height = 247;
$width = 247;
$im = ImageCreate($width, $height);
ImageAntiAlias($im, true);
// Colors
$grass = ImageColorAllocate($im, 67,154,67);
$dorp = ImageColorAllocate($im, 255,0,0);
$bgcolor = ImageColorAllocate($im, 39,104,39);
$white = ImageColorAllocate($im, 255, 0, 0);
ImageFill($im, 0, 0, $bgcolor);
$size = 5;
$size2 = $size + 1;
$query = "SELECT * FROM `een tabel`";
$result = mysql_query($query);
$userarray;
while($row = mysql_fetch_array($result))
{
$userarray[$row['x'] . ',' . $row['y']] = true;
}
for($b=0; $b<=40; $b++)
{
for($i=0; $i<=40; $i++)
{
if ($userarray[$i . ',' . $b] == true)
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $dorp);
}
else
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $grass);
}
}
}
imagejpeg($im, '', 100);
imagedestroy($im);
?>
maar als ik naar de pagina toe ga krijg ik een stuk tekst die te lang is om hier te plaatsen maar ik kan wel een stukje laten zien:
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>39</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0139</td><td bgcolor='#eeeeec' align='right'>844304</td><td bgcolor='#eeeeec'><a href='http://www.php.net/mysql_fetch_array' target='_new'>mysql_fetch_array</a>
( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>39</td></tr>
</table></font>
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: userarray in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>47</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
</table></font>
<br />
weet iemand wat ik fout deed?
Gewijzigd op 16/04/2011 11:12:28 door Uiid -
kan iemand mij nog helpen?
Die output komt vanaf xDebug.
ty
Henk Jansen op 15/04/2011 20:34:24:
ik heb nu dit:
maar als ik naar de pagina toe ga krijg ik een stuk tekst die te lang is om hier te plaatsen maar ik kan wel een stukje laten zien:
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>39</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0139</td><td bgcolor='#eeeeec' align='right'>844304</td><td bgcolor='#eeeeec'><a href='http://www.php.net/mysql_fetch_array' target='_new'>mysql_fetch_array</a>
( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>39</td></tr>
</table></font>
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: userarray in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>47</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
</table></font>
<br />
weet iemand wat ik fout deed?
Code (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
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
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
<?php
require_once (iets);
Header("Content-type: image/png"); // set as png
mysql_connect("$host", "$username", "$password")or die("cannot connect");
// Image Size
$height = 247;
$width = 247;
$im = ImageCreate($width, $height);
ImageAntiAlias($im, true);
// Colors
$grass = ImageColorAllocate($im, 67,154,67);
$dorp = ImageColorAllocate($im, 255,0,0);
$bgcolor = ImageColorAllocate($im, 39,104,39);
$white = ImageColorAllocate($im, 255, 0, 0);
ImageFill($im, 0, 0, $bgcolor);
$size = 5;
$size2 = $size + 1;
$query = "SELECT * FROM `een tabel`";
$result = mysql_query($query);
$userarray;
while($row = mysql_fetch_array($result))
{
$userarray[$row['x'] . ',' . $row['y']] = true;
}
for($b=0; $b<=40; $b++)
{
for($i=0; $i<=40; $i++)
{
if ($userarray[$i . ',' . $b] == true)
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $dorp);
}
else
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $grass);
}
}
}
imagejpeg($im, '', 100);
imagedestroy($im);
?>
require_once (iets);
Header("Content-type: image/png"); // set as png
mysql_connect("$host", "$username", "$password")or die("cannot connect");
// Image Size
$height = 247;
$width = 247;
$im = ImageCreate($width, $height);
ImageAntiAlias($im, true);
// Colors
$grass = ImageColorAllocate($im, 67,154,67);
$dorp = ImageColorAllocate($im, 255,0,0);
$bgcolor = ImageColorAllocate($im, 39,104,39);
$white = ImageColorAllocate($im, 255, 0, 0);
ImageFill($im, 0, 0, $bgcolor);
$size = 5;
$size2 = $size + 1;
$query = "SELECT * FROM `een tabel`";
$result = mysql_query($query);
$userarray;
while($row = mysql_fetch_array($result))
{
$userarray[$row['x'] . ',' . $row['y']] = true;
}
for($b=0; $b<=40; $b++)
{
for($i=0; $i<=40; $i++)
{
if ($userarray[$i . ',' . $b] == true)
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $dorp);
}
else
{
ImageFilledRectangle($im, 1+$i*$size2, 1+$b*$size2, $size+$i*$size2, $size+$b*$size2, $grass);
}
}
}
imagejpeg($im, '', 100);
imagedestroy($im);
?>
maar als ik naar de pagina toe ga krijg ik een stuk tekst die te lang is om hier te plaatsen maar ik kan wel een stukje laten zien:
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>39</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0139</td><td bgcolor='#eeeeec' align='right'>844304</td><td bgcolor='#eeeeec'><a href='http://www.php.net/mysql_fetch_array' target='_new'>mysql_fetch_array</a>
( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>39</td></tr>
</table></font>
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: userarray in C:\Program Files (x86)\wamp\www\create_dorp.php on line <i>47</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>692840</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\Program Files (x86)\wamp\www\create_dorp.php' bgcolor='#eeeeec'>..\create_dorp.php<b>:</b>0</td></tr>
</table></font>
<br />
weet iemand wat ik fout deed?
gebruik mysql_fetch_assoc is plaats dan mysql_fetch_array