Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/284.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
Php Zend framework快速启动索引文件不工作_Php_Zend Framework - Fatal编程技术网

Php Zend framework快速启动索引文件不工作

Php Zend framework快速启动索引文件不工作,php,zend-framework,Php,Zend Framework,大家好,我是Zend framework的新手,只有今天我才开始学习它。所以我的第一步是在我的系统中安装ZF1,所以我已经完成了从下面链接安装所需的步骤https://framework.zend.com/manual/1.12/en/learning.quickstart.create-project.html 当我运行http://localhost/quickstart/ 它显示的是那些文件的索引,而不是运行index.php文件 谁能帮我一下我犯了什么错误,我正在使用ubuntu服务器

大家好,我是Zend framework的新手,只有今天我才开始学习它。所以我的第一步是在我的系统中安装ZF1,所以我已经完成了从下面链接安装所需的步骤
https://framework.zend.com/manual/1.12/en/learning.quickstart.create-project.html

当我运行
http://localhost/quickstart/

它显示的是那些文件的索引,而不是运行index.php文件

谁能帮我一下我犯了什么错误,我正在使用ubuntu服务器

下面是我遵循的东西,我下载了两个zip文件,一个是zendAuth,另一个是和zend framework 1.12.20 我创建了一个名为quickstart的文件夹,并将这些文件移动到quickstart内部

因此,现在我的文件位于
/var/www/quickstart/zendAuth/zemdframeowrk1.12.20

我在
/etc/php/7.2/apache2/php.ini
中做了
php.ini
更改,并在其中做了
include_path=“.:/var/www/quickstart/zendAuth/library”

之后,在文件末尾的
apache2.conf
文件中,我添加了以下代码

 <VirtualHost *:80>
    DocumentRoot "/var/www"
    ServerName localhost
</VirtualHost>
    <VirtualHost *:80>
        ServerName quickstart.local
        DocumentRoot /var/www/html/quickstart/zendAuth/public

        SetEnv APPLICATION_ENV "development"

        <Directory /var/www/html/quickstart/zendAuth/public>
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>

And in hosts file at the top  of the file i have added this  `127.0.0.1    quickstart.local`

Can any one check and let me where i have done mistake and please help me out.

DocumentRoot“/var/www”
服务器名本地主机
ServerName quickstart.local
DocumentRoot/var/www/html/quickstart/zendAuth/public
SetEnv应用程序_ENV“开发”
DirectoryIndex.php
允许超越所有
命令允许,拒绝
通融
在文件顶部的hosts文件中,我添加了这个“127.0.0.1 quickstart.local”`
谁能检查一下,告诉我哪里出了错,请帮我解决。

提前感谢。

您可以尝试以下配置,然后为根目录和公用文件夹设置.htaccess:

1) 主机文件中的条目如下所示

127.0.0.1       quickstart.local
2) 在httpd-vhosts.conf中设置虚拟主机,如下所示

<VirtualHost *:80>
    ServerName quickstart.local
    DocumentRoot "/var/www/html/quickstart/zendAuth/public"
    ServerAlias quickstart.local
    <Directory "/var/www/html/quickstart/zendAuth/public">
        AllowOverride All
        Require all granted
     </Directory>
</VirtualHost>
4) 检查公用文件夹中的htacess,如下所示

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ /$1 [R=302,NE,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
重新编写引擎打开
重写基/
重写cond%{REQUEST_FILENAME}-D
重写规则^(+?)/$/$1[R=302,NE,L]
RewriteCond%{REQUEST_FILENAME}-s[或]
RewriteCond%{REQUEST_FILENAME}-l[或]
RewriteCond%{REQUEST_FILENAME}-d
重写规则^.*$-[L]
RewriteCond%{REQUEST_URI}:$1^(/.+)/(.*):\2$
重写规则^(.*)-[E=基:%1]
重写规则^(.*)$%{ENV:BASE}/index.php[L]
重写cond%{QUERY_STRING}base64_encode.\(.*)[或]
重写条件%{QUERY\u STRING}(\\\\%3E)[NC,或]
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]

您可以尝试以下配置,然后为根目录和公用文件夹设置.htaccess:

1) 主机文件中的条目如下所示

127.0.0.1       quickstart.local
2) 在httpd-vhosts.conf中设置虚拟主机,如下所示

<VirtualHost *:80>
    ServerName quickstart.local
    DocumentRoot "/var/www/html/quickstart/zendAuth/public"
    ServerAlias quickstart.local
    <Directory "/var/www/html/quickstart/zendAuth/public">
        AllowOverride All
        Require all granted
     </Directory>
</VirtualHost>
4) 检查公用文件夹中的htacess,如下所示

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ /$1 [R=302,NE,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
重新编写引擎打开
重写基/
重写cond%{REQUEST_FILENAME}!-d
重写规则^(+?)/$/$1[R=302,NE,L]
RewriteCond%{REQUEST_FILENAME}-s[或]
RewriteCond%{REQUEST_FILENAME}-l[或]
RewriteCond%{REQUEST_FILENAME}-d
重写规则^.*$-[L]
RewriteCond%{REQUEST_URI}:$1^(/.+)/(.*):\2$
重写规则^(.*)-[E=基:%1]
重写规则^(.*)$%{ENV:BASE}/index.php[L]
重写cond%{QUERY_STRING}base64_encode.\(.*)[或]
重写条件%{QUERY\u STRING}(\\\\%3E)[NC,或]
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]