|
|
|
| Здравствуйте!
У меня сайт написан полностью на этом фреймворке, на локольной машине работет, а на хостинг гружу дает ошибку
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /www/weberi01/www/library/Zend.php on line 62
вот эта строка "final class Zend";
а также выдает ошибки по
const VERSION = '0.7.0';
static private $_registry = null;
помогите разобраться.
спасибо!
<?php
/**
* Utility class for common functions.
*
* @category Zend
* @package Zend
* @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
final class Zend
{
/**
* Zend Framework version identification - see compareVersion()
*/
const VERSION = '0.7.0';
/**
* Object registry provides storage for shared objects
* @var Zend_Registry
*/
static private $_registry = null;
/**
* Loads a class from a PHP file. The filename must be formatted
* as "$class.php".
*
* If $dirs is a string or an array, it will search the directories
* in the order supplied, and attempt to load the first matching file.
*
* If $dirs is null, it will split the class name at underscores to
* generate a path hierarchy (e.g., "Zend_Example_Class" will map
* to "Zend/Example/Class.php").
*
* If the file was not found in the $dirs, or if no $dirs were specified,
* it will attempt to load it from PHP's include_path.
*
* @param string $class - The full class name of a Zend component.
* @param string|array $dirs - OPTIONAL either a path or array of paths to search
* @throws Zend_Exception
* @return null
*/
static public function loadClass($class, $dirs = null, $throw = true)
{
if (class_exists($class, false)) {
return;
}
if (null === $dirs) {
$dirs = array();
}
if (is_string($dirs)) {
$dirs = (array) $dirs;
}
// autodiscover the path from the class name
$path = str_replace('_', DIRECTORY_SEPARATOR, $class);
if ($path != $class) {
// use the autodiscovered path
$dirPath = dirname($path);
if (0 == count($dirs)) {
$dirs = array($dirPath);
} else {
foreach ($dirs as $key => $dir) {
$dir = rtrim($dir, '\\/');
$dirs[$key] = $dir . DIRECTORY_SEPARATOR . $dirPath;
}
}
$file = basename($path) . '.php';
} else {
$file = $class . '.php';
}
self::loadFile($file, $dirs, true, $throw);
if (!class_exists($class, false)) {
return false;
}
return true;
}
?>
|
| |
|
|
|
|
|
|
|
для: Даниэль
(18.11.2008 в 15:40)
| | версия php 4? | |
|
|
|
|
|
|
|
для: Root
(18.11.2008 в 15:47)
| | php 4.3.9, только на php 5 есть в ООП такие возможности? | |
|
|
|
|
|
|
|
для: Даниэль
(18.11.2008 в 16:34)
| | да | |
|
|
|
|
|
|
|
для: Root
(18.11.2008 в 16:50)
| | Спс. Поправил. У меня был глюк с php. | |
|
|
|