• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP phpbb_get_files_dir函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中phpbb_get_files_dir函数的典型用法代码示例。如果您正苦于以下问题:PHP phpbb_get_files_dir函数的具体用法?PHP phpbb_get_files_dir怎么用?PHP phpbb_get_files_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: phpbb_copy_thumbnails

/**
* Copy thumbnails of uploaded images from the 2.0.x forum
* This is only used if the Attachment MOD was installed
*/
function phpbb_copy_thumbnails()
{
	global $db, $convert, $user, $config, $cache, $phpbb_root_path;

	$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
	
	if ($handle = @opendir($src_path))
	{
		while ($entry = readdir($handle))
		{
			if ($entry[0] == '.')
			{
				continue;
			}

			if (is_dir($src_path . $entry))
			{
				continue;
			}
			else
			{
				copy_file($src_path . $entry, $config['upload_path'] . '/' . preg_replace('/^t_/', 'thumb_', $entry));
				@unlink($phpbb_root_path . $config['upload_path'] . '/thumbs/' . $entry);
			}
		}
		closedir($handle);
	}
}
开发者ID:BackupTheBerlios,项目名称:phpbb-hu-svn,代码行数:32,代码来源:functions_phpbb20.php


示例2: array

    *										The result *must* be assigned/stored to {RESULT}.
    *							'typecast'	=> typecast value
    *
    *							The returned variables will be made always available to the next function to continue to work with.
    *
    *							example (variable inputted is an integer of 1):
    *
    *							array(
    *								'function1'		=> 'increment_by_one',		// returned variable is 2
    *								'typecast'		=> 'string',				// typecast variable to be a string
    *								'execute'		=> '{RESULT} = {VALUE} . ' is good';', // returned variable is '2 is good'
    *								'function2'		=> 'replace_good_with_bad',				// returned variable is '2 is bad'
    *							),
    *
    */
    $convertor = array('test_file' => 'viewtopic.php', 'avatar_path' => get_config_value('avatar_path') . '/', 'avatar_gallery_path' => get_config_value('avatar_gallery_path') . '/', 'smilies_path' => get_config_value('smilies_path') . '/', 'upload_path' => defined('MOD_ATTACHMENT') ? phpbb_get_files_dir() . '/' : '', 'thumbnails' => defined('MOD_ATTACHMENT') ? array('thumbs/', 't_') : '', 'ranks_path' => false, 'query_first' => array(array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE), array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE), array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE), array('target', $convert->truncate_statement . LOG_TABLE)), 'execute_first' => '
			phpbb_create_userconv_table();
			import_avatar_gallery();
			if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config();
			phpbb_insert_forums();
		', 'execute_last' => array('
			add_bots();
		', '
			update_folder_pm_count();
		', '
			update_unread_count();
		', defined('MOD_ATTACHMENT') ? '
			phpbb_attachment_extension_group_name();
		' : '
		', '
			phpbb_convert_authentication(\'start\');
开发者ID:mysteriou,项目名称:educafacile.com,代码行数:31,代码来源:convert_phpbb20.php


示例3: array

*							array(
*								'function1'		=> 'increment_by_one',		// returned variable is 2
*								'typecast'		=> 'string',				// typecast variable to be a string
*								'execute'		=> '{RESULT} = {VALUE} . ' is good';', // returned variable is '2 is good'
*								'function2'		=> 'replace_good_with_bad',				// returned variable is '2 is bad'
*							),
*
*/

	$convertor = array(
		'test_file'				=> 'viewtopic.php',

		'avatar_path'			=> get_config_value('avatar_path') . '/',
		'avatar_gallery_path'	=> get_config_value('avatar_gallery_path') . '/',
		'smilies_path'			=> get_config_value('smilies_path') . '/',
		'upload_path'			=> (defined('MOD_ATTACHMENT')) ? phpbb_get_files_dir() . '/' : '',
		'thumbnails'			=> (defined('MOD_ATTACHMENT')) ? array('thumbs/', 't_') : '',
		'ranks_path'			=> false, // phpBB 2.0.x had no config value for a ranks path

		// We empty some tables to have clean data available
		'query_first'			=> array(
			array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE),
			array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE),
			array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE),
			array('target', $convert->truncate_statement . LOG_TABLE),
		),

//	with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default.
//	Instead every file gets copied while processing the corresponding attachment entry.
//		if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); }
开发者ID:TupambaeNet,项目名称:phpbb,代码行数:30,代码来源:convert_phpbb20.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP phpbb_get_forum_data函数代码示例发布时间:2022-05-15
下一篇:
PHP phpbb_get_board_contact_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap