本文整理汇总了PHP中create_path函数的典型用法代码示例。如果您正苦于以下问题:PHP create_path函数的具体用法?PHP create_path怎么用?PHP create_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
function create()
{
$this->bep_assets->load_asset_group('TINYMCE');
if ($this->input->post('name')) {
//$this->MCats->addCategory();
$data = $this->_fields();
$this->MKaimonokago->addItem($this->module, $data);
$string = $this->input->post('name');
// createdirname function is from plugin mytools.php
$folder = createdirname($string);
$folder = 'assets/images/' . $folder;
create_path($folder);
// we used to use like this. $this->session->set_flashdata('message','Category created');
// now we are using Bep's flashMsg function to show messages.
flashMsg('success', $this->lang->line('userlib_category_created'));
redirect($this->module . '/admin/index', 'refresh');
} else {
$data['title'] = "Create Category";
$data['categories'] = $this->MCats->getTopCategories();
//$data['right'] = 'admin/category_right';
// Set breadcrumb
$this->bep_site->set_crumb($this->lang->line('userlib_create') . " category", 'category/admin/create');
$data['header'] = $this->lang->line('backendpro_access_control');
// This is how BackendPro do
$data['page'] = $this->config->item('backendpro_template_admin') . "admin_cat_create";
$data['cancel_link'] = $this->module . "/admin/index/";
$data['module'] = $this->module;
$this->load->view($this->_container, $data);
}
}
示例2: move_filtered_file
function move_filtered_file($source, $target, $subs)
{
if (!file_exists($source)) {
throw new Exception("Source file {$source} doesn't exist");
}
if (file_exists($target)) {
throw new Exception("Target file {$target} already exists");
}
$contents = filter_contents(file_get_contents($source), $subs);
create_path(dirname($target));
$fp = fopen($target, "w+");
if (!$fp) {
throw new Exception("Couldn't open target {$target} for write");
}
fwrite($fp, $contents);
fclose($fp);
}
示例3: dirname
#!/usr/bin/env php
<?php
$DIR = dirname(__FILE__);
function create_path($path = '.')
{
if (!file_exists($path)) {
mkdir($path);
}
}
print 'Setting up basic environment variables.' . PHP_EOL;
copy($DIR . '/../.env.example', $DIR . '/../.env');
print 'Setting up application directories.' . PHP_EOL;
create_path($DIR . '/../storage/app');
create_path($DIR . '/../storage/framework');
create_path($DIR . '/../storage/framework/sessions');
create_path($DIR . '/../storage/logs');
print 'Creating empty development database.' . PHP_EOL;
touch($DIR . '/../storage/development.db');
if (chdir($DIR . '/..')) {
print 'Generating random application key.' . PHP_EOL;
exec('php artisan key:generate');
print 'Running database migrations and seeds.' . PHP_EOL;
exec('php artisan migrate:refresh --seed');
} else {
print 'Failed to change working directory, please file an issue.' . PHP_EOL;
}
示例4: create_path
$page['round'] = $page['round'];
}
$page['L_group'] = $lang['competition']['group'];
$page['L_day'] = $lang['competition']['day'];
# round details
$page['display_group'] = "none";
$page['display_day'] = "none";
if (isset($var['value_round']) and $var['value_round'] != "0") {
$var['header'] = 0;
$var['id'] = $page['value_round'];
$var['competition'] = $page['value_competition'];
$var['season'] = $page['value_season'];
$var['group'] = $page['value_group'];
$var['day'] = $page['value_day'];
$included = 1;
include create_path("competition/select_round_all_details.php");
unset($included);
$page['group'] = $page['group'];
$page['day'] = $page['day'];
if ($page['show_group'] == 1) {
$page['display_group'] = "block";
}
if ($page['show_day'] == 1) {
$page['display_day'] = "block";
}
}
# links
$page['link_match'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=match_list");
$page['link_tri_date'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=page_" . $page_num . "_date_" . $sens_inv);
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=match_list");
$page['link_import_match'] = '';
示例5: create_path
<?php
include_once create_path("information/sql_information.php");
include_once create_path("information/lg_information_" . LANG . ".php");
include_once create_path("information/tpl_information.php");
if (!isset($_GET['v1']) or $_GET['v1'] == "") {
include create_path("information/page_list.php");
} else {
switch ($_GET['v1']) {
case "form_page":
include create_path("information/form_page.php");
break;
case "page_list":
include create_path("information/page_list.php");
break;
default:
include create_path("information/view_page.php");
}
}
示例6: fp_loadfile
function fp_loadfile($Frm, $Err)
{
global $order_id;
if (!$Err) {
$f = $Frm->GetValue(0);
//$f["tmp_name"]
//$f["name"]
//$f["size"]
//$f["type"]
if (is_uploaded_file($f["tmp_name"])) {
$extension = get_file_ext($f['name']);
if (trim($Frm->GetValueH(1)) == "") {
$name = $f["name"];
} else {
$name = trim($Frm->GetValueH(1)) . '.' . $extension;
}
$file_id = Order::attachFile($order_id, $_SESSION["user"]["data"]["id"], $name, $f["size"]);
if (!$file_id) {
$Frm->_gui->ERR("Ошибка при загрузке");
} else {
$dir = DIR_FS_ORDER_FILES . $order_id . '/';
if (!is_dir(DIR_FS_ORDER_FILES)) {
create_path('order_files', DIR_FS_DOCUMENT_ROOT);
}
if (!is_dir($dir)) {
create_path($order_id, DIR_FS_ORDER_FILES);
}
$file_name = $file_id . '.' . $extension;
if (move_uploaded_file($f['tmp_name'], $dir . $file_name)) {
$Frm->_gui->OK("Файл загружен");
if ($_SESSION["user"]["data"]["group_id"] == 6 && get_order_author_id($order_id) == $_SESSION["user"]["data"]["id"]) {
$res = change_order_status($order_id, 'RECEIVED_FILE_FROM_AUTHOR');
if ($res == 1) {
$Frm->_gui->OK("Статус заказа изменен");
} else {
$Frm->_gui->ERR($res);
}
}
} else {
Order::deleteAttachedFile($file_id);
$Frm->_gui->ERR("Ошибка при сохранении файла");
}
}
page_reloadAll();
}
}
}
示例7: elseif
$new_weather[$new_id] = $_POST['new_value'][$i];
} elseif ($_POST['new_value_type'][$i] == "field_state") {
$var['name'] = $_POST['new_value'][$i];
$sql_insert_new = sql_replace($sql['match']['insert_field_state'], $var);
sql_query($sql_insert_new, $sgbd);
$new_id = sql_insert_id($sgbd);
$new_field_state[$new_id] = $_POST['new_value'][$i];
} elseif ($_POST['new_value_type'][$i] == "field") {
$var['name'] = $_POST['new_value'][$i];
$sql_insert_new = sql_replace($sql['field']['insert_field_name'], $var);
sql_query($sql_insert_new, $sgbd);
$new_id = sql_insert_id($sgbd);
$new_field[$new_id] = $_POST['new_value'][$i];
} elseif ($_POST['new_value_type'][$i] == "club") {
$var['name'] = $_POST['new_value'][$i];
include_once create_path('club/sql_club.php');
$sql_insert_new = sql_replace($sql['club']['insert_club_name'], $var);
sql_query($sql_insert_new, $sgbd);
$new_id = sql_insert_id($sgbd);
$new_club[$new_id] = $_POST['new_value'][$i];
} elseif ($_POST['new_value_type'][$i] == "competition") {
$var['name'] = $_POST['new_value'][$i];
$sql_insert_new = sql_replace($sql['competition']['insert_competition'], $var);
sql_query($sql_insert_new, $sgbd);
$new_id = sql_insert_id($sgbd);
$new_competition[$new_id] = $_POST['new_value'][$i];
}
}
}
# correspondance des colonnes
$nb_column = sizeof($_POST['match_field']);
示例8: create_path
<?php
##################################
# member : registration
##################################
include_once create_path("club/sql_club.php");
# variables
$page['L_message'] = "";
$nb_erreur = "0";
$page['erreur'] = array();
$page['sex'] = array();
# form values
$page['value_id'] = "";
$page['value_name'] = "";
$page['value_firstname'] = "";
$page['value_email'] = "";
$page['value_date_birth'] = "";
$page['value_sex'] = "";
$page['value_login'] = "";
$page['value_description'] = "";
$page['value_avatar'] = "";
$page['show_form'] = 1;
if (REGISTRATION == 0) {
$page['L_message'] = $lang['member']['E_no_registration'];
$page['show_form'] = '';
}
# case of add
if (REGISTRATION == 1 and isset($_POST) and !empty($_POST)) {
# we format datas
if (isset($_POST['name'])) {
$_POST['name'] = format_txt($_POST['name']);
示例9: create_path
<?php
# we define the rights available for competitions
include_once create_path("competition/lg_competition_" . LANG . ".php");
$right['competition'] = array(array('id' => 'view_competition', 'name' => $lang['competition']['view_competition'], 'default' => 1), array('id' => 'competition_list', 'name' => $lang['competition']['competition_list'], 'default' => 1), array('id' => 'add_competition', 'name' => $lang['competition']['add_competition'], 'default' => 0), array('id' => 'edit_competition', 'name' => $lang['competition']['form_competition_edit'], 'default' => 0), array('id' => 'delete_competition', 'name' => $lang['competition']['delete_competition'], 'default' => 0), array('id' => 'season_list', 'name' => $lang['competition']['season_list'], 'default' => 0));
示例10: unset
unset($included);
$page['match'] = $page['match'];
if ($page['nb_match'] > 0) {
$page['L_match'] = $lang['match']['match'];
$page['L_match_sans_score'] = $lang['match']['E_empty_score'];
$page['show_match'] = "1";
}
# Registration to validate
$page['show_member'] = "";
$page['member'] = array();
if (REGISTRATION) {
include_once create_path("member/sql_member.php");
include_once create_path("member/lg_member_" . LANG . ".php");
include_once create_path("member/tpl_member.php");
$included = 1;
include create_path("member/registration_list.php");
unset($included);
//$page['nb_member']=$page['nb_member'];
//$page['member']=$page['member'];
if ($page['nb_registration'] > 0) {
$page['L_registration_list'] = $lang['member']['registration_list'];
$page['L_registration_list_info'] = $lang['member']['registration_list_info'];
$page['link_registration_list'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=registration_list");
$page['L_member_a_activer'] = $lang['member']['member_a_activer'];
$page['show_member'] = "1";
}
}
# we check if there is some plugin available that need to be installed
$page['plugin'] = array();
$page['show_plugin'] = "";
if ($right_user['plugin_management']) {
示例11: while
while ($ligne = sql_fetch_array($res_liste)) {
$page['position'][$i]['id'] = $ligne['position_id'];
$page['position'][$i]['name'] = $ligne['position_name'];
if (isset($_POST['position']) and $_POST['position'] = $ligne['position_id']) {
$page['position'][$i]['selected'] = "selected";
} else {
$page['position'][$i]['selected'] = "";
}
$i++;
}
sql_free_result($res_liste);
sql_close($sgbd);
}
# liste des sexs
$page['sex'] = array();
include_once create_path("member/sql_member.php");
$sql_sex = $sql['member']['select_sex'];
$sgbd = sql_connect();
$res_sex = sql_query($sql_sex);
$nb_ligne = sql_num_rows($res_sex);
if ($nb_ligne != "0") {
$i = "0";
while ($ligne = sql_fetch_array($res_sex)) {
$page['sex'][$i]['id'] = $ligne['sex_id'];
$page['sex'][$i]['name'] = $ligne['sex_name'];
if (isset($page['value_sex']) and $page['value_sex'] == $ligne['sex_id']) {
$page['sex'][$i]['checked'] = "checked=\"checked\"";
} else {
$page['sex'][$i]['checked'] = "";
}
$page['sex'][$i]['link_select_member'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=select_member");
示例12: create_path
<?php
# we define the rights available for team
include_once create_path("team/lg_team_" . LANG . ".php");
$right['team'] = array(array('id' => 'view_team', 'name' => $lang['team']['view_team'], 'default' => 1), array('id' => 'team_list', 'name' => $lang['team']['team_list'], 'default' => 1), array('id' => 'add_team', 'name' => $lang['team']['add_team'], 'default' => 0), array('id' => 'edit_team', 'name' => $lang['team']['edit_team'], 'default' => 0), array('id' => 'delete_team', 'name' => $lang['team']['delete_team'], 'default' => 0), array('id' => 'team_coach_list', 'name' => $lang['team']['team_coach_list'], 'default' => 1), array('id' => 'team_player_list', 'name' => $lang['team']['team_player_list'], 'default' => 1), array('id' => 'position_list', 'name' => $lang['team']['position_list'], 'default' => 0), array('id' => 'team_name_list', 'name' => $lang['team']['team_name_list'], 'default' => 0));
示例13: unset
unset($included);
$tmp = $page['stats'];
$page['standings'] = $page['standings'];
$page['L_message_standings'] = $page['L_message_standings'];
$page['L_standings'] = $lang['match']['standings'];
$page['L_show_standings'] = $lang['match']['show_standings'];
# stats_player
$page['show_form'] = "";
$page['value_limit'] = " LIMIT 30 ";
if (empty($page['value_group'])) {
$page['value_group'] = array();
} else {
$page['value_group'] = array($page['value_group']);
}
$included = 1;
include create_path("match/stats_player.php");
unset($included);
$page['match_stats_player'] = $page['stats_player'];
$page['stats_player'] = $page['stats'];
$page['L_stats_player'] = $lang['match']['stats_player'];
$page['L_show_stats_player'] = $lang['match']['show_stats_player'];
$page['stats'] = $tmp;
# modification
$page['link_edit'] = "";
$page['link_delete'] = "";
if ($right_user['edit_competition']) {
$page['link_edit'] = convert_url("index.php?r=" . $lang['general']['idurl_competition'] . "&v1=form_competition&v2=" . $page['id']);
}
if ($right_user['edit_competition']) {
$page['link_delete'] = convert_url("index.php?r=" . $lang['general']['idurl_competition'] . "&v1=competition_list&v2=delete&v3=" . $page['id']);
}
示例14: header
header('Content-type: text/html; charset=' . $lang['general']['charset']);
}
$show_stats = $ms_column;
$nb_club_max = MS_NB_CLUB_MAX;
$page['ms_show_form'] = MS_SHOW_FORM;
if (!isset($_POST['season']) and MS_SEASON != '') {
$page['value_season'] = MS_SEASON;
}
if (!isset($_POST['competition']) and MS_COMPETITION != '') {
$page['value_competition'] = MS_COMPETITION;
}
if (!isset($_POST['round']) and MS_ROUND != '') {
$page['value_round'] = MS_ROUND;
}
$included = 1;
include create_path("match/standings.php");
unset($included);
if ($page['ms_show_form'] == 0) {
$page['season'] = array();
$page['competition'] = array();
$page['round'] = array();
}
# link
$page['form_action'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=mini_standings");
$page['link_standings'] = convert_url("index.php?r=" . $lang['general']['idurl_match'] . "&v1=standings&v2=" . $page['value_competition'] . "&v3=" . $page['value_round'] . "&v4=" . $page['value_season']);
# text
$page['L_place'] = $lang['match']['place_ab'];
$page['L_show_standings'] = $lang['match']['show_standings'];
# template
if (!isset($included_mini_standings) or $included_mini_standings == 0) {
$page['fen'] = "ajax";
示例15: create_path
<?php
# we define the rights available for fields
include_once create_path("field/lg_field_" . LANG . ".php");
$right['field'] = array(array('id' => 'view_field', 'name' => $lang['field']['view_field'], 'default' => 1), array('id' => 'field_list', 'name' => $lang['field']['field_list'], 'default' => 1), array('id' => 'add_field', 'name' => $lang['field']['add_field'], 'default' => 0), array('id' => 'edit_field', 'name' => $lang['field']['edit_field'], 'default' => 0), array('id' => 'delete_field', 'name' => $lang['field']['delete_field'], 'default' => 0));