Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Autoloader.php通过FTP配置细枝_Php_Html_Ftp_Twig - Fatal编程技术网

使用Autoloader.php通过FTP配置细枝

使用Autoloader.php通过FTP配置细枝,php,html,ftp,twig,Php,Html,Ftp,Twig,我尝试让Twig在我的应用程序中工作 所以,我在Twig文件夹中解包并上传了FTP上的Twig文件 我在twig_templatesfolder templatebase.twig中创建了如下内容: <!DOCTYPE html> <html lang="pl"> <head> <title>{{title}}</title> <meta charset="UTF-8">

我尝试让Twig在我的应用程序中工作

所以,我在
Twig
文件夹中解包并上传了FTP上的Twig文件

我在
twig_templates
folder template
base.twig
中创建了如下内容:

<!DOCTYPE html>

<html lang="pl">
    <head>
        <title>{{title}}</title>

        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>

    <body>

        <div id="content-container">        
            <{{type}} id="content">         
            {% block content %}
            {% endblock %}
            </{{type}}>
        </div>

    </body>
</html>


我完全无法让它工作,也不知道为什么。我试过使用
.twig
.html
文件,但似乎没有任何区别。(对我来说)代码似乎很好,所以可能都是关于Twig配置的?

您遇到了什么错误?到目前为止,我还没有注意到任何错误日志,我不知道如何获取错误日志:/能否请您解释如何通过FTP连接Netbeans 8.0来获取服务器错误?(只有我收到的消息与正确的FTP连接有关。)
 <?php     

require_once '/Twig/lib/Twig/Autoloader.php';
Twig_Autoloader::register();

$loader = new Twig_Loader_Filesystem('/twig_templates');
$twig = new Twig_Environment($loader, array(
    'cache' => '/twig_templates/cache') );


$template = $twig->loadTemplate('base.twig');
echo $template->render(array (title=>"title", type=>"article"));

?>