´äº¯ÀÌ ´Ê¾ú±º¿ä....
Áö±Ý ¿¹ºñ±º ÈÆ·Ã ³¡³ª°í ³ª¼....
Á¦ »ý°¢À¸·Î´Â
PHP¿¡¼ mysql_connect()ÇÔ¼ö¸¦
Áö¿øÇÏÁö ¾ÊÀ¸¹Ç·Î
PHP3 ÄÄÆÄÀϽà --with-mysql ¿É¼ÇÀ» ³ÖÁö ¾ÊÀº°Í °°±º¿ä...
PHP3¸¦ RPMÀ¸·Î ¼³Ä¡Çß´Ù¸é php3-mysql-xxxx.rpm
°ú °°Àº ÆÐÅ°Áö¸¦ µû·Î ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù...
<?
/**phpinfo.php3**************/
phpinfo();
?>
À§¿Í °°ÀÌ phpinfo.php3 ·Î È®ÀνÃ
"--with-mysql" À̶ó´Â ¿É¼ÇÀÌ ÀÖ´ÂÁö È®ÀÎÇØ º¸¼¼¿ä...
¾ø´Ù¸é ´Ù½Ã ÄÄÆÄÀÏÇϵçÁö RPMÀ¸·Î ¼³Ä¡ÇÏ½Ã±æ ¹Ù¶ø´Ï´Ù...
================================
[Á¤ÀÍ]´ÔÀÌ ³²±â½Å ±Û:
>´äº¯°¨»çÇÕ´Ï´Ù.
>°íÄ¡±ä Çߴµ¥
>
>Fatal error: Call to unsupported or undefined function mysql_connect() in
/home/esperanz/public_html/testphp/input.php3 on line 12
>
>ÀÌ·¸°Ô ¶ß³×¿ä
>
>user : myuser
>p.w : myuser
>db : myuserdb
>
>-- input.html --
>
><html>
><head>
><title>php ù¹ø° Å×½ºÆ®</title>
></head>
><body>
><center>
><form action="input.php3" method="post">
><h1>½Å±Ôȸ¿ø °¡ÀÔ½Åû¼</h1>
><br><br>
><h3>°³ÀÎÁ¤º¸¸¦ ÀÔ·ÂÇϽʽÿÀ</h3>
><table>
><tr>
><td> ¾ÆÀ̵ð</td>
><td> <input type="text" name="id"
size="30"></td>
></tr>
><tr>
><td> ÀÌ ¸§</td>
><td> <input type="text" name="name"
size="30"></td>
></tr>
><tr>
><td> Àü È</td>
><td> <input type="text" name="tel"
size="30"></td>
></tr>
><tr>
><td colspan=2 align=center>
><input type="submit" value="½Åû"><input
type="reset" value="Áö¿ì±â">
></td>
></tr>
></table>
></center>
></body>
></html>
>
>-- input.php3 --
>
><?
>if(!$name){
> echo("<script>
> windows.alert('À̸§À»
³ÖÀ¸¼¼¿ä')
> history.go(-1)
> </script>
> ");
>
> exit;
> }
>
>$connection =
mysql_connect("localhost","myuser","myuser");
>
>mysql_select_db("myuserdb",$connection);
>$dbresult=mysql_query("insert into info values('$id', $name', '$tel')",
$connection);
>
>if($dbresult=="")
>{
> echo("
> <script>
> window.alert('µ¥ÀÌÅÍ
ÀԷ¿À·ù!!!')
> history.go(-1)
> </script>
> ");
> exit;
>}
>?>
>
>±×¸®°í DB Å×À̺íÀº È®½ÇÈ÷ myuserdb ¹×¿¡ info·Î µÇ¾îÀÖ½À´Ï´Ù.
========================================
|