This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ไอพี)(PORT = พอรืต)))(CONNECT_DATA=(SID=ชื่อinstance)))"; | |
$objConnect = oci_connect("ชื่อ","รหัส",$db); | |
if (!$objConnect) | |
echo 'Failed to connect to Oracle'; | |
else | |
echo 'Succesfully connected with Oracle DB'; | |
oci_close($objConnect); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bean; | |
public class StudentBean | |
{ | |
//มี property | |
String fName; | |
String lName; | |
float gpa; | |
//มี Get และ Set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page contentType="text/html" %> | |
<%@page pageEncoding="UTF-8" %> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<!--เรียกใช้ Class ใน Bean --> | |
<jsp:useBean id="std" scope="page" class="bean.StudentBean"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
String Topspin = "Paranat"; | |
int age = 15; | |
out.println("Name :"+Topspin); | |
out.println("age :"+age); | |
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$topspin = 1234 | |
echo $topspin; | |
?> |
NewerOlder