ลิงค์แนะนำ
- Thailand Fishing Fishing Thailand Fishing Trip In Thailand Fishing And Travel In Thailand www.thfishingclub.com
- Freelance Freelance Jobs Part Time Job งานฟรีแลนซ์ ฟรีแลนซ์ งานนอกเวลา งาน Freelance หางาน Freelance หางานฟรีแลนซ์ www.jobbid.in.th
- จำหน่าย เสื้อผ้าเกาหลี เสื้อผ้าแฟชั่นเกาหลี แฟชั่นเสื้อผ้าเกาหลี เสื้อผ้าแฟชั่น แฟชั่นเกาหลี เสื้อเกาหลี เสื้อแฟชั่น แฟชั่นเสื้อผ้า www.bonusfashion.com
- the shock ผี เดอะช็อค shockfm เรื่องผี shock fm ฟังเรื่องผี the shock fm shock เดอะช็อก the shock ฟังสด shockfm ฟังสด 102 รายการผี
วันพุธที่ 7 พฤศจิกายน พ.ศ. 2550
PHP include file
require_once("function/function_connectdb.php");
type 2
require("function/function_connectdb.php");
type 3
include_once("function/function_connectdb.php");
type 4
include("function/function_connectdb.php");
type 5
include($_SEVER['DOCUMENT_ROOT']."function_connectdb.php");
วันเสาร์ที่ 3 พฤศจิกายน พ.ศ. 2550
javascript,php create xml file
วันพุธที่ 31 ตุลาคม พ.ศ. 2550
javascript opener
window.opener.location.reload();
detail: if you open 2 window and you want update one window ,anothor window will reload too
วันพฤหัสบดีที่ 25 ตุลาคม พ.ศ. 2550
PHP Export Data To Ms Word File
header('Content-type: application/ms-word');
header('Content-Disposition: attachment; filename="testing.doc"');
PHP Export Data To Ms Excel File
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename="testing.csv"');
วันพุธที่ 17 ตุลาคม พ.ศ. 2550
Class Send Email PHP
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp1.site.com;smtp2.site.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "jswan"; // SMTP username
$mail->Password = "secret"; // SMTP password
$mail->From = "from@email.com";
$mail->FromName = "Mailer";
$mail->AddAddress("josh@site.com","Josh Adams");
$mail->AddAddress("ellen@site.com"); // optional name
$mail->AddReplyTo("info@site.com","Information");
$mail->WordWrap = 50; // set word wrap
$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
$mail->IsHTML(true); // send as HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML body";
$mail->AltBody = "This is the text-only body";
if(!$mail->Send())
{
echo "Message was not sent
";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
Download Class Here
http://sourceforge.net/project/downloading.php?groupname=phpmailer&filename=phpmailer-1.73.zip&use_mirror=jaist
วันจันทร์ที่ 15 ตุลาคม พ.ศ. 2550
PHP Class Connect Database (Mssql)
Class Connectdb{
var $host;
var $username;
var $password;
var $dbname;
function Connectdb(){
# Real
$this ->host = "$host";
$this ->username = "$user";
$this ->password = "$password";
$this ->dbname = "$dbname";
# Connect DB
mssql_connect($this ->host,$this ->username,$this ->password) or die ("Can't connect DB" );
# Select DB
mssql_select_db($this ->dbname) or die("Can't select DB");
}
}
วันอาทิตย์ที่ 14 ตุลาคม พ.ศ. 2550
PHP Get Value Meta Tag
$tags = get_meta_tags('http://www.man-za.com');
echo $tags['author'];
echo $tags['keywords'];
echo $tags['description'];
PHP Code Connect Oracle
# config
define("sDevDatabaseName", "$databasename");
define("sDevUserName", "$username");
define("sDevPassword", "$password");
# connect
$conn = ocilogon(sDevUserName, sDevPassword, sDevDatabaseName);
$SQLs ="select * from tablename";
$st_cate = ociparse($conn, $SQLs);
ociexecute($st_cate, OCI_DEFAULT);
while (ocifetch($st_cate)) {
# Get data each field
$fieldname_id = ociresult($st_cate, "fieldname");
}
#return free result
ocifreestatement($st_cate);