Since you have come to visit this post, I’d assume that you have the basics of ZF. We know that the index.php inside the “public” directory is the entry point for ZF apps. ZF also needs to find the Zend library in PHP’s include path. If we want to run our applications from the root directory, we somehow need to manage an index.php which will call the index.php inside “public” directory. We also need to upload the Zend library and put it into include_path.
1) Upload the “library” directory of Zend Framework somewhere on your hosting. Note the full path of the directory.
2) Create a project on your local machine (if you haven’t done already.)
3) Upload the project files on to your web root (www or public_html).
4) Copy the .htaccess file from the “public” directory to your web root.
5) Create a index.php and put these codes:
1 2 3 4 5 6 7 8 |
<?php set_include_path(implode(PATH_SEPARATOR, array( '/home/masnunco/library', // the path to Zend Library get_include_path(), ))); require_once 'public/index.php'; |
Replace ‘/home/masnunco/library’ with the full path to the Zend library you uploaded earlier.
Visit your website and check if it works 🙂 In most cases it would work. Have fun!