Auto login ใน WinXP
หลายครั้งที่หงุดหงิดการการถามรหัสผ่านในหน้าจอ login ของ WinXP ถ้าคุณทำงานอยู่ที่บ้าน ไม่มีใครมายุ่งกับเครื่องของคุณ ก็ทำให้ windows เป็น auto login เสียเลย
ขั้นแรก ให้ login เข้า windows ด้วย user ที่เป็น administrator แล้วคลิกปุ่ม Start->Run พิมพ์คำสั่ง control userpasswords2
ในหน้าต่าง User Accounts ให้คลิก Users must enter a user name and password to use this computer ออกเสีย แล้วคลิก Apply
แก้ปัญหาพิมพ์ Express XP5 ไม่ได้ใน WinXP
To use the Net.exe command
- Click Start, point to All Programs, point to Accessories, and then click Command Prompt.
At the command prompt, type
net use lptx: \\printserver\sharename /persistent:yes
where x is the number of the LPT port that you are using (usually 1 or 2), printserver is the name of your print server, and sharename is the name of the printer share.
Note To disconnect a persistent LPT connection, type the following at a command prompt: net use lptx /delete
document.referrer
< script language="JavaScript"> if (document.referrer){ document.write("You came from " + document.referrer); } document.write(this.document.location); < /script>
พารามิเตอร์ จากการ GET ใน html file
ค่าของ GET parameter ที่ได้รับมา
< script type="text/javascript"> < !-- var query=this.location.search.substring(1); var get=[]; if (query.length > 0){ var params=query.split("&"); for (var i=0 ; i < params.length ; i++){ var pos = params[i].indexOf("="); var name = params[i].substring(0, pos); var value = params[i].substring(pos + 1); get[name]=value; document.write( i + ":" + name); document.write("=" + value); document.writeln(""); } } var photo = get["photo"] ? get["photo"] : "photo_1"; // -- > < /script>
New web application
วันนี้ได้งานเว็บไซท์ใหม่ เป็นเว็บฐานข้อมูลโครงการการพัฒนานวัตกรรมบริการสุขภาพปฐมภูมิ เลยนำมาเป็นต้นแบบในการพัฒนา CMS ใหม่
www.pcuinnovation.com : primary care unit innovation : โครงการการพัฒนานวัตกรรมบริการสุขภาพปฐมภูมิ
CMS รุ่นใหม่ที่ำกำลังพัฒนาคืบหน้าได้ช้ามาก ส่วนหนึ่งคงมาจากไม่มีเว็บมารองรับการพัฒนาใหม่ (ตามที่ตั้งใจเดิมคือพัฒนาเพื่อนำไปใช้กับเว็บเดิมที่มีอยู่) มาวันนี้ต้องเปิดโครงการใหม่ จึงถือโอกาสนำมาเป็นต้นแบบสำหรับสร้าง CMS ใหม่เสียเลย พร้อมทั้งเวลาที่บีบบังคับให้ต้องทำให้เสร็จในกำหนด
คำถามคาใจ : ค่าตัวแปรที่มีการใช้งานบ่อย ไม่มีการเปลี่ยนแปลงในโปรเซสควรเป็นอะไร
ค่าบางอย่างเป็นค่าที่ได้มาจากการหาโดยอัตโนมัติ เช่น url ที่กำลังทำงานอยู่ , absolute folder ของ url ที่กำลังทำงาน ควรเก็บไว้ในตัวแปรประเภทไหนดีจึงจะสะดวกในการทำงาน
1. define
2. global variable
3. config : สามารถเรียกใช้ผ่าน cfg('url') ได้ แต่การเรียกผ่าน function ย่อมต้องช้ากว่าการเรียกผ่าน define หรือ variable แน่
โจทย์ : upgrade system
การ upgrade ฐานข้อมูลในแต่ละครั้ง ไม่จำเป็นต้องเช็คตัวฐานข้อมูล
โจทย์ : menu system
- สร้างเมนูเสมือนได้
- clean url package เหมือนกัน แต่เรียกจากไฟล์ต่างกัน
โจทย์ : database & table
- เรียกใช้ง่าย
- เพิ่มชื่อตารางได้
โจทย์ : config system
- config จากไฟล์
- config จากฐานข้อมูล
- มีค่า default
- สามารถ เพิ่ม/เปลี่ยนค่า/ลบ config จาก index.php ได้