php - Page not found on request url in zend 2 framework application -
I'm new to zooming the framework and I'm trying to configure the zend. I successfully installed the zendskeleton applicaion at Window 7 and XAMPP I was making the new module album as defined. In the User Guide I was creating all the code and pages according to the guide, but after that I was able to open the Album Module I did not find the error 404. application.config module.config Module.php httpd-vhosts.conf Host entry How do I Thanksgiving When you copy your Apache document route to You need to use this url edit this url for a separate module / location internally // If this does not work then check your zf2 . Make sure Apache here
back array ('module' = & Array ('application', 'album',), 'module_paths' = & gt; array (' ./module ',' ./vendor ',),' config_glob_paths' = & gt; array ('config / autoload / {, *.} {Global, local} .php ',),))););
return array ('controller' => array ( 'Array (' path '= & gt; array (' album '= & gt; array (' album \ controller \ album '=' album controller \ album controller ')),' router '= & Array ('type' = & gt; 'Segment', 'Option' => Array ('path' = & gt; '/ album [/] [: verb] [/: id]', '' Barriers ==> Array ('action' = & gt; '[a-zA-Z] [a-zA-Z0-9 _-] *', 'id' => [0- 9] Array ('Controller' = & gt; 'album \ controller \ album', 'action' => 'index',)))))))),),) , 'Individually _manejr '= & gt; Array ('template_path_stack' = & gt; array ('album' = & gt; __DIR__. '/../view',),))););
namespace album; // Add these import statements: use album \ model \ album; Use the album \ Model \ AlbumTable; Use Zend \ Db \ ResultSet \ ResultSet; Use Zend \ Db \ TableGateway \ TableGateway; Class module {// getAutoloaderConfig () and getConfig () methods // Add this method here: public function getServiceConfig () {return array ('factories' => array ('album \ model \ albumTable' => function ($ SM) {$ tableGateway = $ sm-> Mill ('AlbumTableGateway'); $ table = new AlbumTable ($ tableGateway); Return $ Table;}, 'AlbumTableGateway' => Function ($ SM) { $ DbAdapter = $ sm-> Mill ('Zend \ Db' adapter 'adapter'); $ resultSetPrototype = new ResultSet (); $ resultSetPrototype-> setArrayObjectPrototype (new album); Return New TableGateway ('Album ', $ DbAdapter, null, $ resulting prototype) ;},),); }}
& lt; VirtualHost *: 81 & gt; ServerName zf2-tutorial.localhost DocumentRoot "C: / xampp \ htdocs / ZendSkeletonApplication / ZendSkeletonApplication- Master / Public" SetEnv APPLICATION_ENV "Development" & lt; Directory C: / xampp \ htdocs / ZendSkeletonApplication / ZendSkeletonApplication- Master / Public & gt; DirectoryIndex index.php AllowOverride Allow all orders, Deny all & lt; / Directory & gt; & Lt; / VirtualHost & gt; system32
127.0.0.1:8081 zf2-tutorial.localhost
C: / xampp \ htdocs / ZendSkeletonAccording to application / ZendSkeletonApplication Master / Public http in your browser: //zf2-tutorial.localhost: 8081 / album and not Not written like http :. //zf2-tutorial.localhost/ZendSkeletonApplication/ZendSkeletonApplication-master/public/album / public folder if there is a .htaccess file present, otherwise use the file < Code> Port is equal to your Windows host file port, please also check your Apache vhost entry ModRewrite is loading!
Comments
Post a Comment