<?php
/**
* 手机接口初始化文件
* @copyright Copyright (c) 2007-2013 ShopNC Inc. (http://www.shopnc.net)
* @license http://www.shopnc.net
* @link http://www.shopnc.net
* @since File available since Release v1.1
*/
define(‘APP_ID‘,‘mobile‘);
define(‘IGNORE_EXCEPTION‘, true);
define(‘BASE_PATH‘,str_replace(‘\\‘,‘/‘,dirname(__FILE__)));
//__FILE__是当前php程序的完整路径 dirname(__FILE__)是__FILE__所在文件夹的完整路径
require __DIR__ . ‘/../shopnc.php‘;// require 包含并执行文件,处理失败时停止执行
//include 包含文件,处理失败时继续执行
//魔术常量__DIR__,指向当前执行的PHP脚本所在的目录。同dirname(__FILE__)
//使用“../”来表示上一级目录,“../../”表示上上级的目录,以此类推
//这个路径没有搞明白
//框架扩展
require(BASE_PATH.‘/framework/function/function.php‘);
Shopnc\Core::runApplication(); //C写的扩展
原文:http://www.cnblogs.com/asdfgh/p/4872368.html