File tree Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Original file line number Diff line number Diff line change 1
- <?php
2
-
3
- define ("SERVIDOR " ,"nombre del servidor " );
4
- define ("USUARIO " ,"usuario " );
5
- define ("CLAVE " ,"tu clave " );
6
- define ("BASE_DATOS " ,"tu base de datos " );
7
-
8
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
9
-
10
- function Conexion ()
11
- {
12
- if (!($ cn =mysqli_connect (SERVIDOR ,USUARIO ,CLAVE ,BASE_DATOS )))
13
- {
14
- echo "Error conectando a la base de datos. " ;
15
- exit ();
16
- }
17
- if (!mysqli_select_db ($ cn ,BASE_DATOS ))
18
- {
19
- echo "Error seleccionando la base de datos. " ;
20
- exit ();
21
- }
22
-
23
- return $ cn ;
24
-
1
+ <?php
2
+
3
+ define ("SERVIDOR " ,"nombre del servidor " );
4
+ define ("USUARIO " ,"usuario " );
5
+ define ("CLAVE " ,"tu clave " );
6
+ define ("BASE_DATOS " ,"tu base de datos " );
7
+
8
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
9
+
10
+ function Conexion ()
11
+ {
12
+ if (!($ cn =mysqli_connect (SERVIDOR ,USUARIO ,CLAVE ,BASE_DATOS )))
13
+ {
14
+ echo "Error conectando a la base de datos. " ;
15
+ exit ();
16
+ }
17
+ if (!mysqli_select_db ($ cn ,BASE_DATOS ))
18
+ {
19
+ echo "Hay un error en la base de datos. " ;
20
+ exit ();
21
+ }
22
+
23
+ return $ cn ;
24
+
25
25
}
You can’t perform that action at this time.
0 commit comments