【www.gdgbn.com--页面特效】

Jakarta Struts结构移植过来的PHP开发框架,使用面向对象的开发结构和API,模拟了一个HTTP Servlet容器和使用了PHP服务页面引擎技术。

下载地址:http://mojavelinux.com/projects/studs/

文件结构如下:

如上图,WEB-INF中的文件都是Studs框架的核心文件(尤其是lib和tld下的文件),其中:

1.messages.properties文件:



welcome.title=Studs :: Welcome
welcome.heading=Welcome to Studs!
welcome.message=The application has been successfully installed!

pageviews.message=This page has been viewed {0} times.

2.struts-config.xml文件:




    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">



    

    
        
    


    
        
    


    
        
        
    


    
        
        
        

        
    


    

    

3.web.xml文件:







    Studs Basic Application
    A bare-bones foundation for creating a web application based on the Studs MVC Framework+
    
        
        controlAllResources
        false
    


    
    
        default
        stratus.servlets.DefaultServlet
        
            listings
            true
        

        1
    

    
        phase
        phase.servlet.PhaseServlet
        
            scratchdir
            /WEB-INF/work
        

        
            tldresourcedir
            /WEB-INF/tld
        

        
            ignoreEL
            false
        

        2
    

    
        action
        studs.action.ActionServlet
        
            config
            /WEB-INF/struts-config.xml
        

        
            validating
            true
        

        3
    


    
    
        default
        /
    

    
        phase
        *.psp
    

    
        action
        *.do
    


    
    
        html
        text/html
    

    
        css
        text/css
    

    
        js
        text/javascript
    

    
        png
        image/png
    

    
        jpg
        image/jpeg
    

    
        jpeg
        image/jpeg
    

    
        gif
        image/gif
    


    
    
        index.psp
    


4.文件build.xml:





    

    
        
        
            
                
                
                
            
        
    

    
        
        
        

        
            
                
            
            
                
            
            
                
            
        
    

    
        
        
        
        
        
        
            
                
            
        
        
        
        
            
                
            
        
        
        
            
                
                
            
        
    

5.logging.properties文件:



# == Setup log appenders ==
#logging.rootLogger=DEBUG, file
#logging.appender.file=horizon.util.logging.FileLogAppender
#logging.appender.file.file=/tmp/studs-basic.log
# == Specific logging per category ==
#logging.logger.[partial package or classname]=DEBUG

其他文件基本上都可以在框架源代码中找到。

页面文件如下:

1.index.php:



error_reporting(E_ALL);
ini_set(""include_path"", ""WEB-INF/lib"" . (DIRECTORY_SEPARATOR == ""/"" ? "":"" : "";"") . ""WEB-INF/classes"");
umask(0002);

require_once ""horizon/init.php"";

import(""stratus.connector.HttpProcessor"");
import(""stratus.config.ContextConfig"");

$config = & new ContextConfig(dirname(__FILE__));
$processor = & new HttpProcessor($config->getContext());
$processor->run();
?>

2.index.psp:



<%...

本文来源:http://www.gdgbn.com/wangyetexiao/12465/