我有這樣的PHP代碼 -爲什麼我的PHP包含功能無法正常工作?
<?php include('res/scripts/php/content_type/form_contents/birth_date_form.php?type=register&query=birth_month'); ?>
正如你可以看到,我包括它?type
和&query
,所以它是錯誤的或者有別的東西哪去錯了。因爲它顯示了我下面的錯誤---
Warning: include(res/scripts/php/content_type/form_contents/birth_date_form.php?type=register&query=birth_month) [function.include]: failed to open stream: No error in C:\xampp\htdocs\mysharepoint\1.1\res\scripts\php\content_type\register_form.php on line 82
Warning: include() [function.include]: Failed opening 'res/scripts/php/content_type/form_contents/birth_date_form.php?type=register&query=birth_month' for inclusion (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\mysharepoint\1.1\res\scripts\php\content_type\register_form.php on line 82
但是,消除?type=register&query=birth_month
後,我沒有得到任何錯誤! 所以你有什麼建議,請讓我知道。
在此先感謝!
您是否試圖將文件加載爲php - 然後運行腳本,或加載腳本在運行後生成的內容? – 2011-03-30 17:31:04