ฉันได้สร้างโปรเจ็กต์ zend บน Ubuntu ซึ่งอยู่ในไดเร็กทอรี /var/www/student/
ตอนนี้ฉันมีไฟล์ head.phtml ในตำแหน่งนี้:
/student/application/views/scripts/index/head.phtml
เมื่อฉันพยายามรวมไฟล์ head.phtml เข้าไป
/student/application/modules/test/views/scripts/all/index.phtml
แบบนี้:
echo $this->partial('index/head.phtml');
มันทำให้ฉันมีข้อผิดพลาดดังต่อไปนี้:
Message: script 'index/head.phtml' not found in path (/var/www/student/application/modules/notification/views/scripts/)
การรวมไฟล์เป็นงานที่ยากสำหรับฉันเสมอ วิธีแก้ไขปัญหานี้ ฉันต้องรวมไฟล์นี้ในหลาย ๆ โมดูล แล้วอะไรคือวิธีแก้ปัญหาแบบถาวรสำหรับสิ่งนี้ ซึ่งฉันไม่ควรเดาเส้นทาง
ขอบคุณ
echo $this->partial('all/head.phtml');
- person Karl Laurentius Roos   schedule 29.05.2011