当前位置: 首页>>代码示例>>PHP>>正文


PHP F3::serve方法代码示例

本文整理汇总了PHP中F3::serve方法的典型用法代码示例。如果您正苦于以下问题:PHP F3::serve方法的具体用法?PHP F3::serve怎么用?PHP F3::serve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在F3的用法示例。


在下文中一共展示了F3::serve方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

function main()
{
    F3::set('name', 'world');
    F3::set('buddy', array('Tom', 'Dick', 'Harry'));
    F3::set('gender', 'M');
    F3::set('loggedin', 'true');
    F3::set('div', array('coffee' => array('arabica', 'barako', 'liberica', 'kopiluwak'), 'tea' => array('darjeeling', 'pekoe', 'samovar')));
    F3::set('rows', array(1, 2, 3, 4, 5));
    echo F3::serve('5template.htm');
}
开发者ID:seyyah,项目名称:f3,代码行数:10,代码来源:5template.php

示例2: file

/**
	The function below could have been saved as an import file (render.php)
	loaded by the F3::route method like the other route handlers; but let's
	embed it here so you can see how you can mix and match MVC functions
	and import files.

	Although allowed by Fat-Free, functions like these are not recommended
	because they pollute the global namespace, specially when it's defined
	in the main controller. In addition, the separation of the controller
	component and the business logic becomes blurred when we do this - not
	good MVC practice.

	It's all right to define the function here if you're still figuring out
	the structural layout of your application, but don't trade off coding
	convenience for good programming habits.
**/
function render()
{
    // layout.htm is located in the directory pointed to by the Fat-Free
    // GUI global variable
    echo F3::serve('layout.htm');
}
开发者ID:seyyah,项目名称:f3ldap,代码行数:22,代码来源:index.php

示例3: render

function render()
{
    echo F3::serve('layout.htm');
}
开发者ID:seyyah,项目名称:uzkay,代码行数:4,代码来源:index.php

示例4: test

function test()
{
    echo F3::serve("example.htm");
}
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:4,代码来源:index.php

示例5: Axon

<?php

// Retrieve blog entries
$kul = new Axon('kul');
F3::set('entries', $kul->find());
/**
	We could have just as easily accomplished the above using the following:
		F3::sql('SELECT title,entry,time FROM blogs;');
		F3::set('entries',F3::get('DB.result'));
**/
echo F3::serve('rss.xml', FALSE);
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:11,代码来源:rss.php


注:本文中的F3::serve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。