ผมลองเขียนตัวอย่างง่ายๆ ดังนั้
[code]<form name="form1" method="post" action="Insert_Content.php">
ผมลองเขียนตัวอย่างง่ายๆ ดังนั้
[code]<form name="form1" method="post" action="Insert_Content.php">
ผลลองพิมพ์ดูแล้วก้อ ได้นิครับ
//ไฟล์ ที 2 ต้องเป็นตัวใหญ่เล็กตามนี้ด้วยนครับ
Insert_Content.php
ลองดูอีกทีนะครับ
ผมลองทุกทางแล้วครับ ลอง upload ไปยัง web hosting แล้วด้วยก็ได้ผลลัพธ์เหมือนกัน มันเป็น code ง่ายๆ ไม่น่าจะมีอะไรผิดพลาดนะครับ ยังไงลอง test ให้หน่อยนะครับ ว่าเหมือนกันหรือเปล่า
ผมพอจะทราบสาเหตุแล้วครับสำหรับ php version 4.3.9 ลองอ่านนี่ดูนะครับ
- register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables). Instead of using $foo, you must use
; you can use $_REQUEST["foo"] (includes any variable that arrives through the
; request, namely, POST, GET and cookie variables), or use one of the specific
; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
; on where the input originates. Also, you can look at the
; import_request_variables() function.
; Note that register_globals is going to be depracated (i.e., turned off by
; default) in the next version of PHP, because it often leads to security bugs.
; Read http://php.net/manual/en/security.registerglobals.php for further
; information.
ผมว่าพี่เขาเปิด register_gobal เรียบร้อยแล้วนะครับ ผมว่ามานคงไม่เกี่ยวนะครับ
เขาใช้ localhost นะครับ ;-)ผมว่าพี่เขาเปิด register_gobal เรียบร้อยแล้วนะครับ ผมว่ามานคงไม่เกี่ยวนะครับ
สรุปแล้วต้องตั้ง่ค่าของ global reqister เป็น on หรือ off ละครับ แล้วถ้าผมจะ upload ไฟล์ไปที่ web hosting จะต้องตั้งค่ายังไงครับ
ถ้าเขาใช้ localhost ก็มานตั้งค่าเป็น on แล้วนี้ครับผมลง apache มานก็ตั้งค่าเป็น on ให้ครับ ถ้าไม่ได้ลองเข้าไปแก้ที่ c:/windows/php.ini แล้วแก้เป็น on ดูครับ มานน่าจะได้นะครับ
Actions : (View-Readers)
There are no names to display.
Members who have read this thread: 0