พบกับบทความเกี่ยวกับคอมพิวเตอร์และ programming ได้ที่ http://articles.modoeye.com | บล็อกอาหาร
PHP development / การใช้ คำสั่ง header ช่วยแนะนำทีครับ
MaIJingJing
MaIJingJing
Fri 29 Aug 2008 18:18:55

header("location: borrow/Borrow_form.php");

จากโค้ดข้างบนนะครับ ผมทำการเรียก ไฟล์ Borrow_form.php  ที่อยู่ใน folder borrow

คำถาม ถ้าผมต้องการย้อนกลับไปไฟล์ก่อนหน้านั้น จะต้องพิมพ์คำสั่งยังไงครับ

ตัวอย่างเช่น ถ้าจะกลับไปไฟล์ login.php ที่อยู่ใน folder login ใช้คำสั่ง header("location: login.php"); มันไม่ได้อ่ะครับ ต้องเขียนยังไงหรอครับ

MaIJingJing
MaIJingJing
Fri 29 Aug 2008 18:32:21

ขอบคุณมากครับผมทำได้แล้วครับ งงต้องนาน พอมา post ทำได้ซะงั้น

webmaster
webmaster
Fri 29 Aug 2008 18:35:10
การอ้างอิงสามารถทำได้ 2 แบบครับ

Absolute path คือการอ้างตั้งแต่ root เช่น http:/www.example.com/test/testfile.php
Relative path คือการอ้างจากความสัมพันธ์จาก directory/file ที่อยู่ปัจจุบัน เช่น ../testfil.php
การใช้งาน relative path จะมีเพิ่มมาคือ
. หมายถึง current directory
.. หมายถึง parent directory
Reply
Name:
E-mail:
Home | Services | Forum | Classified | Directories | Support | Contact
ATOM feed RSS 0.9 feed RSS 1.0 feed RSS 2.0 feed
Copyright © 2005 - 2007 Modoeye.com, All Rights Reserved.
Disclaimer | Privacy policy | Term of Use | Term of Services
Valid XHTML Valid CSS! PHP: Hypertext Preprocessor MySQL database Apache Powered! FreeBSD Power to serve
Modoeye Sitemap Client login