Possible Duplicate:
failed to open stream: Invalid argumentrequire_once();無效的參數錯誤
// Define the core paths
// Define them as absolute paths to make sure that require_once works as expected
// DIRECTORY_SEPARATOR is a PHP pre-defined constant
// (\ for Windows,/for Unix)
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('SITE_ROOT') ? null :
define('SITE_ROOT', DS.'C:'.DS.'wamp'.DS.'www'.DS.'photo_gallery');
defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'includes');
// load config file first
require_once(LIB_PATH.DS.'config.php');
// load basic functions next so that everything after can use them
require_once(LIB_PATH.DS.'functions.php');
// load core objects
require_once(LIB_PATH.DS.'session.php');
require_once(LIB_PATH.DS.'database.php');
// load database-related classes
require_once(LIB_PATH.DS.'user.php');
無論何時,我想在我的地址欄本地主機/ photo_gallery /公/管理/ index.php文件輸入到運行該代碼。它會顯示如下錯誤:
Warning: require_once(\C:\wamp\www\photo_gallery\includes\config.php): failed to openstream: Invalid argument in C:\wamp\www\photo_gallery\includes \initialize.php on line 16.
Fatal error: require_once(): Failed opening required '\C: \wamp\www\photo_gallery\includes\config.php'(include_path='.;C:\php\pear') in C:\wamp\www\photo_gallery\includes\initialize.php on line 16
請告訴我該怎麼辦?是一個初學者啓動webdesigner,並陷入這個致命的錯誤。
使用定義,而不是定義 – Hkachhia
這麼多的重複:http://stackoverflow.com/questions/13759360/fatal-error-require-once-failed-opeining-required-c-wamp-www-photo-畫廊,http://stackoverflow.com/questions/13759794/require-once-failed-to-openstream-invalid-argument-in-c-wamp-www-photo-gall#13759794 –
你給的答案解釋你的錯誤完美。我們不提供勺子,錯誤在於該文件不存在。現在處理它,不過你想。 –