½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
css
mysql
html
jquery
������
image
Mobile
API
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 53 | Á¶È¸¼ö 610 | µî·ÏÀÏ 2001-04-07 00:55:30

´Ð³×ÀÓ

Anonymous

À̸ÞÀÏ

Á¦¸ñ

php·Î ÀÛ¼ºÇÑ Ä«¿îÅÍ ¿¡·¯
³»¿ë
¾È³çÇϽʴϱî? php¸¦ ¸· ½ÃÀÛÇÑ Ãʺ¸ÀÔ´Ï´Ù. "php À¥¼­¹ö ÇÁ·Î±×·¡¹Ö"À̶ó´Â Ã¥¿¡ ½áÀÖ´Â ´ë·ç ´ÙÀ½Ã³·³ Äڵ带 ÀÛ¼ºÇß½À´Ï´Ù.

<?php
$datafile="counter.data";
if(file_exists($datafile))
{
$fp=fopen($datafile, 'r');
$buffer=fread($fp, filesize($datafile));
fclose($fp);
$count=intval($buffer);
}
else
{
$count=0;
}
$count=$count+1;
$fp=fopen($datafile, 'w');
fwrite($fp, $count);
fclose($fp);

echo "´ç½ÅÀº $count ¹ø° ¹æ¹®ÇÑ ¼Õ´ÔÀÔ´Ï´Ù.";
?>

ÀÌ·¸°Ô ÀÛ¼ºÇÑ ÆÄÀÏÀ» counter.php4·Î ¸®´ª½º»óÀÇ /var/www/html(¿Í¿ì¸®´ª½º ±îÄ¡7.0)¿¡ ÀúÀåÇÏ°í À¥ºê¶ó¿ìÀú¿¡¼­ ½ÇÇà½ÃÄ״µ¥ ´ÙÀ½°ú °°Àº ¿¡·¯°¡ ³µ½À´Ï´Ù.

warning: fopen("counter.data", "w")-permission denied in /var/www/html/counter.php4 on line 19
warning: supplied argument is not a valid file- handle resource in /var/www/html/counter.php4 on line 20
  warning: supplied argument is not a valid file- handle resource in /var/www/html/counter.php4 on line 21

Âü°í·Î counter.php4´Â pico·Î ÀÛ¼ºÇß½À´Ï´Ù.
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û ¾È³çÇϼ¼¿© ¿µÀÚ´Ô...º¸µå°ü·Ã Áú¹®µå¸³´Ï´Ù. 2001-04-06 21:23:48
´ÙÀ½°Ô½Ã±Û ¼ºÀÇ ÀÖ´Â ´äº¯¿¡ °¨»çµå¸³´Ï´Ù. 2001-04-07 01:01:57