小编Men*_*nno的帖子

如何在不使用composer的情况下安装twig

我想为一个项目安装 twig,但没有对服务器的命令行访问权限。我只能通过 ftp 上传文件。这意味着我必须手动设置 twig lib,即自己创建 Autoload.php 文件。我已经彻底搜索过,但有关此主题的信息很少。我尝试了从另一个项目“借用”的以下自动加载,但这不会产生工作设置。

<?php

/*
 * This file is part of Twig.
 *
 * (c) 2009 Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * Autoloads Twig classes.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Twig_Autoloader
{
    /**
     * Registers Twig_Autoloader as an SPL autoloader.
     *
     * @param bool    $prepend Whether to prepend the autoloader or …
Run Code Online (Sandbox Code Playgroud)

php installation twig

3
推荐指数
1
解决办法
9040
查看次数

标签 统计

installation ×1

php ×1

twig ×1