QeePHP配置时出现错误了,有图

liu6581199 2012-03-08 03:29:56


...全文
111 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
liu6581199 2012-03-08
  • 打赏
  • 举报
回复
我用的是WAMP,PHP版本是5.3.5的,能用什么办法把它的版本降低。
前提是不需要重新安装软件
liu6581199 2012-03-08
  • 打赏
  • 举报
回复
谢谢啊,至少有了头绪了。好人啦
xuzuning 2012-03-08
  • 打赏
  • 举报
回复
对于 php5.3.x namespace 是保留字,不能作为函数名
你可以降低改用 php5.2.x 就没有问题了
你可以搜索一下是否有适合 php5.3 的 QeePHP 版本,永久性的解决问题
你还可以遍历所有文件,把 namespace( 替换成 name_space(,不过还可能有不兼容的地方
liu6581199 2012-03-08
  • 打赏
  • 举报
回复
我把这个文件的内容发成blog了,网址是http://blog.csdn.net/liu6581199/article/details/7333180


<?php

class QReflection_Controller
{
/**
* 控制器名称
*
* @var string
*/
protected $_controller_name;

/**
* 控制器名字空间
*
* @var string
*/
protected $_namespace;

/**
* 控制器的 UDI
*
* @var string
*/
protected $_udi;

/**
* 控制器的类名称
*
* @var string
*/
protected $_controller_class_name;

/**
* 控制器文件完整路径
*
* @var string
*/
protected $_controller_file_path;

/**
* 控制器所属模块的反射
*
* @var QReflection_Module
*/
protected $_module;

/**
* 构造函数
*
* @param QReflection_Module $module
* @param string $controller_name
* @param string $namespace
*/
function __construct(QReflection_Module $module, $controller_name, $namespace = null)
{
$names = explode('::', $controller_name);
if (isset($names[1]))
{
$namespace = $names[0];
$controller_name = $names[1];
}

$this->_module = $module;
$this->_controller_name = $controller_name;
$this->_namespace = $namespace;

// 确定控制器对应的文件
$controller_name = strtolower($controller_name);
$dir = rtrim($module->moduleDir(), '/\\') . '/controller';
if ($namespace)
{
$this->_controller_file_path = "{$dir}/{$namespace}/{$controller_name}_controller.php";
}
else
{
$this->_controller_file_path = "{$dir}/{$controller_name}_controller.php";
}

// 确定控制器的类名称
if (!$module->isDefaultModule())
{
$class = ucfirst($module->moduleName()) . '_';
}
else
{
$class = '';
}
$class .= 'Controller_';
if ($namespace) $class .= ucfirst($namespace) . '_';
$class .= ucfirst($controller_name);
$this->_controller_class_name = $class;

// 确定控制器的 UDI
if ($namespace)
{
$udi = $namespace . '::' . $controller_name;
}
else
{
$udi = $controller_name;
}

if (!$module->isDefaultModule())
{
$udi .= '@' . $module->moduleName();
}
$this->_udi = $udi;
}

/**
* 返回该控制器所属模块的反射
*
* @return QReflection_Module
*/
function module()
{
return $this->_module;
}

/**
* 返回该控制器所属应用的反射
*
* @return QReflection_Application
*/
function app()
{
return $this->_module->app();
}

/**
* 返回控制器名称
*
* @return string
*/
function controllerName()
{
return $this->_controller_name;
}

/**
* 返回控制器文件的完整路径
*
* @return string
*/
function filePath()
{
return $this->_controller_file_path;
}

/**
* 返回控制器所属的名字空间
*
* @return string
*/
function namespace()
{
return $this->_namespace;
}

/**
* 返回控制器所述模块的名字
*
* @return string
*/
function moduleName()
{
return $this->module()->moduleName();
}

/**
* 返回控制器的类名称
*
* @return string
*/
function className()
{
return $this->_controller_class_name;
}

/**
* 返回控制器的 UDI 名称
*
* @return string
*/
function UDI()
{
return $this->_udi;
}
}




xuzuning 2012-03-08
  • 打赏
  • 举报
回复
你这个是 F:\wamp\www\qeephp-2.1\extended\qreflction\controller.php 155 行附近的代码吗?
如果是,请贴出这个文件的全部代码,注意不是截图!因为它提示的是语法错误
liu6581199 2012-03-08
  • 打赏
  • 举报
回复
http://blog.csdn.net/liu6581199/article/details/7333180

我把代码发到博客去了,有代码,你直接搜索function namespace() 他就是155行
liu6581199 2012-03-08
  • 打赏
  • 举报
回复
xuzuning 2012-03-08
  • 打赏
  • 举报
回复
贴出出错文件的 155 行附近的代码,并指出155行的位置

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧