我对PHP一无所知,我尝试安装一个php网站,它显示了这个错误:
注意:使用未定义的常量CAKE_CORE_INCLUDE_PATH - 假设' CAKE_CORE_INCLUDE_PATH'在第79行的/usr/local/crowdfunding/app/webroot/test.php中警告:include(Cake / bootstrap.php):无法打开流:/ usr / local / crowdfunding / app / webroot中没有这样的文件或目录第91行/test.php警告:include():打开失败' Cake / bootstrap.php'包含(include_path =' / usr / local / crowdfunding / lib:CAKE_CORE_INCLUDE_PATH:/ usr / local / crowdfunding / app /:.:/ usr / share / pear:/ usr / share / php')in第91行/usr/local/crowdfunding/app/webroot/test.php致命错误:找不到CakePHP核心。检查APP / webroot / index.php中CAKE_CORE_INCLUDE_PATH的值。它应该指向包含/ cake核心目录和/ vendors根目录的目录。在第100行的/usr/local/crowdfunding/app/webroot/test.php
在test.php上:( cakephp测试):
set_time_limit(0);
ini_set('display_errors', 1);
/**
* Use the DS to separate the directories in other defines
*/
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
/**
* The full path to the directory which holds "app", WITHOUT a trailing DS.
*
*/
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
/**
* The actual directory name for the "app".
*
*/
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
define('APP_PATH', null);
define('CORE_PATH', null);
} else {
define('APP_PATH', ROOT . DS . APP_DIR . DS);
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
}
if (!include('Cake' . DS . 'bootstrap.php')) {
$failed = true;
}
} else {
if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
$failed = true;
}
}
if (!empty($failed)) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (Configure::read('debug') < 1) {
die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
}
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
CakeTestSuiteDispatcher::run();
文件结构:
Config/config.php
bootstrap.php
...
webroot/test.php
似乎无法在那里搜索Config文件夹。我该怎么办才能让它发挥作用?
感谢。
答案 0 :(得分:0)
检查index.php文件并查看CAKE_CORE_INCLUDE_PATH指向的位置...您可能需要将该行复制到test.php文件。
ie:<input type="hidden" id="hiddenArrayField"/>
document.getElementById("hiddenArrayField").value=yourStringifyArrayValue;