ServerZoo虛擬主機使用教學文件區 Home      會員列表      Register Now!
舊 2013-11-12, 11:27 PM   #1
Tech-SZ 的頭像
 
Tech-SZ
最高權限

預設 網站空間上使用支援Zend Framework

您好
如果您於ServerZoo 虛擬主機網站空間上要使用自己的Zend framework 您可以到
http://framework.zend.com/ 下載後,並上傳到您網站上使用即可 ,完整教學如下範例

引用:
PHP frameworks have multiple benefits in web development as rapidly web application development,
user-friendly URL namespaces, classes and methods.

Based on Model-View-Controller (MVC) paradigm and supplied with a new command line tool,
Zend Framework is gaining popularity in PHP object-oriented web applications development.

Here is simple tutorial to install and configure the Zend framework under Linux Cpanel shared account.

system requirement

Quote:
# PHP 5.2.4 or later version and apache mod_rewrite module.
# SUEXEC enabled server ( To affect account level PHP enviournment in php.ini file )
# Jailshell access.
Configuration

Quote:
# Get Zend Framework from zend.com/community/downloads Zend Community Downloads - Zend.com and extract the contents to your local disk.

# Extract ZendFramework-XX.tar.gz and rename 'ZendFramework-x.x.x' folder to Zend

# Upload 'Zend' folder under Document root : Eg. /home/cpusername/public_html/
Please make sure FTP transfers the files in binary mode (BIN).

# Display the PHP information. Create a file 'info.php' with the following line in it:
<?php phpinfo(); ?>

# Visit your site or preview site and open info.php - make a note of the "DOCUMENT_ROOT" value, and the "include_path" value.

# create php.ini file under same folder and add your zend library path in include path , enable allow_url_fopen and allow_url_include functions:

include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/cpusername/public_html/Zend/library"
allow_url_fopen = On
allow_url_include = On

# open .htaccess file and put following line :

SetEnv PHPRC /home/cpusername/public_html/php.ini

# create zend-test.php file and put following code :

<?
require_once 'Zend/Mail.php';
$mail=new Zend_Mail();
echo 'it is working';
?>

# Access domain.com/zend-test.php
It will show "it is working" message if everything goes fine

Now let's create one test application using ZF Command Line tool (CLI) which is supplied with Zend Framework

You can get detail ZF CLI usage information here : framework.zend.com/manual/en/zend.tool.usage.cli.html

Quote:
Set aliase for Zend/bin/zf.sh binary with following command :

$ alias zf='/home/cpusername/public_html/Zend/bin/zf.sh'

$ chmod 755 /home/cpusername/public_html/Zend/bin/zf.shzf.sh

$ zf show version

$ zf --help

cd /home/cpusername/public_html/

$ zf create project my-zf-test

It will say : Creating project at /home/cpusername/public_html/Zend/my-zf-test
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Done !

Access : domain.com/my-zf-test/public/


# Contact to support to update the domain document root directly to the public directory where your ZF application resides :

Eg. /home/cpusername/public_html/my-zf-test/public

Now just set appropriate redirect rules under .htaccess file.
ref: http://en.wikipedia.org/wiki/Zend_Framework

此篇文章於 2014-03-11 10:46 PM 被 Tech-SZ 編輯。.
Show SignatureDisplay Signature 回覆時引用此篇文章
回覆

書籤

主題工具
顯示模式

發文規則
不可以發表新主題
不可以發表回覆
不可以上傳附件
不可以編輯自己的文章

啟用 BB 代碼
論壇啟用 表情符號
論壇啟用 [IMG] 代碼
論壇禁用 HTML 代碼

論壇跳轉


所有時間均為台北時間。現在的時間是 11:39 PM


Powered by vBulletin® 版本 3.8.0
版權所有 ©2000 - 2018,Jelsoft Enterprises Ltd.