当我尝试使用ipsRegistry类时,总是会出现此错误。
Fatal error: Class 'ipsRegistry' not found in path/info.php on line 4
我不知道为什么会这样。

info.php

<?php
require_once( 'http://website.com/forum/initdata.php' );
require_once( 'http://website.com/forum/admin/sources/base/ipsRegistry.php' );
$registry = ipsRegistry::instance();
$registry->init();

// Fetch member details
$member = $registry->member()->fetchMemberData();

// Print the display name
print $member['members_display_name'];
?>

ipsRegistery.php包含以下类:
<?php
/**
 * <pre>
 * Invision Power Services
 * IP.Board v3.4.6
 * ipsRegistry:: Registry file controlls handling of objects needed throughout IPB
 * Last Updated: $Date: 2013-10-16 12:57:41 -0400 (Wed, 16 Oct 2013) $
 * </pre>
 *
 * @author      $Author: AndyMillne $
 * @copyright   (c) 2001 - 2009 Invision Power Services, Inc.
 * @license     http://www.invisionpower.com/company/standards.php#license
 * @package     IP.Board
 * @link        http://www.invisionpower.com
 * @since       Tue. 17th August 2004
 * @version     $Rev: 12380 $
 */

/**
* Base registry class
*/
class ipsRegistry
{
    /**
     * Holds instance of registry (singleton implementation)
     *
     * @var     object
     */
    private static $instance;

    /**
     * Registry initialized yet?
     *
     * @var     boolean
     */
    private static $initiated = FALSE;

    /**
     * SEO templates
     *
     * @var     array
     */
    protected static $_seoTemplates = array();

    /**
     * Incoming URI - used in SEO / fURL stuffs
     *
     * @var     string
     */
    protected static $_uri = '';

    /**
     * Flag to note incorrect FURL (no furl template match)
     *
     * @var     string
     */
    protected static $_noFurlMatch = false;

    /**#@+
     * Holds data for app / coreVariables
     *
     * @var     array
     */
    protected static $_coreVariables            = array();
    protected static $_masterCoreVariables  = array();
    /**#@-*/

    /**
     * Handles for other singletons
     *
     * @var     array
     */
    protected static $handles                   = array();

该文件本身很长,上面的代码只是一个片段。如何解决此问题?文件路径有问题吗?

最佳答案

您不能要求网站中的文件。您只能要求文件位于您的文件系统中。如果您输入http://,它将包含输出而不是整个文件。

10-05 23:03