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

PHP j函数代码示例

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

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



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

示例1: process

 /**
  * Controller
  */
 public function process()
 {
     if (!Phpfox::isUser()) {
         exit;
     }
     $aImage = Phpfox_File::instance()->load('image', array('jpg', 'gif', 'png'));
     if ($aImage === false) {
         return j('#js_image_error')->show();
     }
     $aParts = explode('x', $this->request()->get('ad_size'));
     if ($sFileName = Phpfox_File::instance()->upload('image', Phpfox::getParam('ad.dir_image'), Phpfox::getUserId() . uniqid())) {
         Phpfox_Image::instance()->createThumbnail(Phpfox::getParam('ad.dir_image') . sprintf($sFileName, ''), Phpfox::getParam('ad.dir_image') . sprintf($sFileName, '_thumb'), Phpfox::getParam('ad.multi_ad') ? 100 : $aParts[0] / 3, Phpfox::getParam('ad.multi_ad') ? 72 : $aParts[1] - 20);
         Phpfox_File::instance()->unlink(Phpfox::getParam('ad.dir_image') . sprintf($sFileName, ''));
         rename(Phpfox::getParam('ad.dir_image') . sprintf($sFileName, '_thumb'), Phpfox::getParam('ad.dir_image') . sprintf($sFileName, ''));
         // http://www.phpfox.com/tracker/view/14922/ -> If CDN, the unlink function above deletes the image!!
         if (Phpfox::getParam('core.allow_cdn')) {
             Phpfox::getLib('cdn')->put(Phpfox::getParam('ad.dir_image') . sprintf($sFileName, ''));
         }
         return ['run' => '$(\'.js_ad_image\').html(\'<a href="#ad-link"><img src="' . Phpfox::getParam('ad.url_image') . sprintf($sFileName, '') . '" alt="" /></a>\').show(); window.parent.$(\'#js_image_holder_message\').hide(); window.parent.$(\'#js_image_holder_link\').show(); window.parent.$(\'#js_image_id\').val(\'' . sprintf($sFileName, '') . '\');'];
     }
     exit;
 }
开发者ID:lev1976g,项目名称:core,代码行数:25,代码来源:image.class.php


示例2: fail

    {
        $a1 = "old string";
        $a2 = "old string";
        echo "about to include included_var_overwrite.php\n";
        include "included_var_overwrite.php";
        if ($a1 == "old value" or $a2 == "my old value") {
            fail(__FILE__, __LINE__, "var overwrite within class");
        }
    }
}
$h = new H();
var_dump($h);
$h = $h->g();
var_dump($h);
# the included file using varaibles from this file
$i1 = "some value";
$i2 = "another value";
echo "about to include included_use_existing_vars.php\n";
include "included_use_existing_vars.php";
# the included file using functions from this file
echo "about to include included_use_vars_in_function.php\n";
include "included_use_vars_in_function.php";
$j = j(1, 2);
var_dump($j);
# the included file using classes from this file
echo "about to include included_use_vars_in_classes.php\n";
include "included_use_vars_in_classes.php";
$k = new K();
var_dump($k);
$k = $k->kk();
var_dump($k);
开发者ID:michaelprem,项目名称:phc,代码行数:31,代码来源:include_complex.php


示例3: a

<?php

a('b');
?>

<?php 
echo C . D::e('f' . $g);
$h = i();
j();
/* comments */
开发者ID:exakat,项目名称:exakat,代码行数:10,代码来源:Functioncall.57.php


示例4: j

<?php

'a' . ($b['c'] == 'd' ? "e{$f}g{$h['i']}" . j('k') . "l" . m('n') . "o" : "p{$q}r{$s['t']}u" . ($v['w'] != X ? "y" . z('aa') . "'ab" : "ac" . ad('ae') . "af") . "ag" . ah('ai') . "aj") . "ak";
开发者ID:exakat,项目名称:exakat,代码行数:3,代码来源:Ternary.12.php


示例5: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description  
 * @package Codeine
 * @version 8.x
 */
setFn('Read', function ($Call) {
    if (preg_match('/<\\?xml/', $Call['Value'])) {
        return jd(j(simplexml_load_string($Call['Value'], null, LIBXML_NOCDATA), JSON_NUMERIC_CHECK), true);
    } else {
        return jd(j(simplexml_load_string('<root>' . $Call['Value'] . '</root>'), JSON_NUMERIC_CHECK), true);
    }
});
开发者ID:trickyplan,项目名称:codeine,代码行数:15,代码来源:XML.php


示例6: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description  
 * @package Codeine
 * @version 8.x
 */
setFn('Open', function ($Call) {
    return F::Run('IO.Storage.Redis', 'Open', $Call);
});
setFn('Read', function ($Call) {
    F::Log('Pull: ' . $Call['Scope'] . $Call['Queue'], LOG_INFO, 'Administrator');
    if (($Result = $Call['Link']->lPop($Call['Scope'] . $Call['Queue'])) !== false) {
        return [jd($Result, true)];
    } else {
        return null;
    }
});
setFn('Write', function ($Call) {
    F::Log('Push: ' . $Call['Scope'] . $Call['Queue'], LOG_INFO, 'Administrator');
    return $Call['Link']->rPush($Call['Scope'] . $Call['Queue'], j($Call['Data']));
});
setFn('Count', function ($Call) {
    F::Log('Count: ' . $Call['Scope'] . $Call['Queue'], LOG_INFO, 'Administrator');
    return $Call['Link']->lLen($Call['Scope'] . $Call['Queue']);
});
开发者ID:trickyplan,项目名称:codeine,代码行数:27,代码来源:Redis.php


示例7: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description: 
 * @package Codeine
 * @version 8.x
 */
setFn('Read', function ($Call) {
    $Result = jd($Call['Value'], true);
    if (json_last_error() > 0) {
        F::Log('JSON: ' . json_last_error_msg(), LOG_ERR);
        F::Log($Call['Value'], LOG_ERR);
    }
    return $Result;
});
setFn('Write', function ($Call) {
    return j($Call['Value'], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
});
setFn('Write.Call', function ($Call) {
    $Call['Value'] = j($Call['Value']);
    return $Call;
});
开发者ID:trickyplan,项目名称:codeine,代码行数:23,代码来源:JSON.php


示例8: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description  
 * @package Codeine
 * @version 8.x
 */
setFn('Do', function ($Call) {
    if ($Call['Case']['Result']['Actual'] == $Call['Case']['Assert']['Equal']) {
        $Decision = true;
    } else {
        $Call['Failure'] = true;
        $Decision = false;
        F::Log(j($Call['Case']['Result']['Actual']) . ' is not equal ' . j($Call['Case']['Assert']['Equal']), LOG_WARNING, 'Developer');
    }
    return $Decision;
});
开发者ID:trickyplan,项目名称:codeine,代码行数:18,代码来源:Equal.php


示例9: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description  
 * @package Codeine
 * @version 8.x
 */
setFn('Make', function ($Call) {
    $Data = [];
    if (count($Call['Value']) > 0) {
        foreach ($Call['Value'] as $K => $V) {
            if ($K > 0) {
                $Data[] = [$Call['Name'] => $V];
            }
        }
    }
    $Call['Data'] = j($Data, JSON_UNESCAPED_UNICODE);
    return $Call;
});
开发者ID:trickyplan,项目名称:codeine,代码行数:20,代码来源:Multifield.php


示例10: insert

 function insert($p_value, $p_prefix)
 {
     $sql = "insert into document_type(dt_value,dt_prefix) values (\$1,\$2)";
     try {
         if ($this->db->count_sql('select * from document_type where upper(dt_value)=upper(trim($1))', array($p_value)) > 0) {
             throw new Exception('Nom en double');
         }
         if (strlen(trim($p_value)) > 0) {
             $this->db->exec_sql($sql, array($p_value, $p_prefix));
         }
     } catch (Exception $e) {
         alert(j(_("Impossible d'ajouter [{$p_value}] ") . $e->getMessage()));
     }
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:14,代码来源:class_document_type.php


示例11: j

<?php

$a = $_GET['b'] ?? 'c';
$d = E::f($g) ?? $h;
$i = j('l') ?? l;
开发者ID:exakat,项目名称:exakat,代码行数:5,代码来源:Coalesce.01.php


示例12: setFn

    return true;
});
setFn('Execute', function ($Call) {
    F::Log($Call['Command'], LOG_INFO);
    return $Call['Link']->execute($Call['Command']);
});
setFn('Count', function ($Call) {
    $Call['Scope'] = strtr($Call['Scope'], '.', '_');
    if (isset($Call['Where']) and $Call['Where'] !== null) {
        $Call = F::Apply(null, 'Where', $Call);
        if (isset($Call['Distinct']) && $Call['Distinct']) {
            F::Log('db.*' . $Call['Scope'] . '*.distinct(' . j($Call['Where']) . ')', LOG_INFO, 'Administrator');
            $Data = $Call['Link']->{$Call}['Scope']->distinct($Call['Fields'][0], $Call['Where']);
            return count($Data);
        } else {
            F::Log('db.*' . $Call['Scope'] . '*.count(' . j($Call['Where']) . ')', LOG_INFO, 'Administrator');
            $Cursor = $Call['Link']->{$Call}['Scope']->count($Call['Where']);
        }
    } else {
        if (isset($Call['Distinct']) && $Call['Distinct']) {
            F::Log('db.*' . $Call['Scope'] . '*.distinct()', LOG_INFO, 'Administrator');
            $Data = $Call['Link']->{$Call}['Scope']->distinct($Call['Fields'][0]);
            return count($Data);
        } else {
            F::Log('db.*' . $Call['Scope'] . '*.count()', LOG_INFO, 'Administrator');
            $Cursor = $Call['Link']->{$Call}['Scope']->count();
        }
    }
    if ($Cursor) {
        return $Cursor;
    } else {
开发者ID:trickyplan,项目名称:codeine,代码行数:31,代码来源:Mongo.php


示例13: setFn

<?php

/* Codeine
 * @author [email protected]
 * @description  
 * @package Codeine
 * @version 8.x
 */
setFn('Process', function ($Call) {
    if (isset($Call['Node']['Unique']) && $Call['Node']['Unique'] && isset($Call['Data'][$Call['Name']])) {
        if ($Call['Name'] !== 'ID') {
            $Where = [$Call['Name'] => $Call['Data'][$Call['Name']], 'ID' => ['$ne' => $Call['Data']['ID']]];
            $Limit = 0;
        } else {
            if ($Call['Purpose'] == 'Create') {
                $Limit = 0;
            } else {
                $Limit = 1;
            }
            $Where = ['ID' => $Call['Data']['ID']];
        }
        F::Log('Checking unique *' . $Call['Name'] . '* value *' . $Call['Data'][$Call['Name']] . '* (' . $Call['Purpose'] . ')', LOG_INFO);
        $Count = F::Run('Entity', 'Count', ['Entity' => $Call['Entity'], 'Where' => $Where]);
        if ($Count > $Limit) {
            F::Log('Non-unique (' . $Count . '/' . $Limit . ') ' . $Call['Name'] . ' value: ' . j($Call['Data'][$Call['Name']]) . ' ', LOG_ERR);
            return 'Unique';
        }
    }
    return true;
});
开发者ID:trickyplan,项目名称:codeine,代码行数:30,代码来源:Unique.php


示例14: j

             }
         }
         if (!isset($Rule['Weight'])) {
             $Rule['Weight'] = $Call['Weight'];
         }
         if ($Rule['Weight'] >= $Call['Weight']) {
             if (isset($Rule['Run']) && F::Diff($Rule['Run'], $Call) === null) {
                 if (!isset($Rule['Expression']) || F::Live($Rule['Expression'], $Call)) {
                     F::Log('Rule ' . $Name . ' applied', LOG_DEBUG, 'Security');
                     $Call['Decision'] = $Rule['Decision'];
                     $Call['Weight'] = $Rule['Weight'];
                     $Call['Rule'] = $Name;
                 }
             } else {
                 if (isset($Rule['Debug'])) {
                     F::Log('Diff ' . $Name . ' (Rule, Call)' . j(F::Diff($Rule['Run'], $Call)), LOG_INFO, 'Security');
                 }
             }
             if (isset($Call['Service']) && isset($Rule['Run']['Service']) && isset($Rule['Run']['Method']) && isset($Rule['Message'])) {
                 if ($Call['Service'] == $Rule['Run']['Service'] && $Call['Method'] == $Rule['Run']['Method']) {
                     $Call['Message'] = $Rule['Message'];
                 }
             }
         }
     }
 } else {
     F::Log('No rules loaded', LOG_WARNING);
 }
 if (isset($Call['Rule'])) {
     F::Log('Rule *' . $Call['Rule'] . '* decision *' . $Call['Decision'] . '* with weight ' . $Call['Weight'], LOG_INFO, 'Security');
 }
开发者ID:trickyplan,项目名称:codeine,代码行数:31,代码来源:Rule.php


示例15: fopen

if (isset($_REQUEST['plugin_code'])) {
    if (LOGINPUT) {
        $file_loginput = fopen($_ENV['TMP'] . '/scenario-' . $_SERVER['REQUEST_TIME'] . '.php', 'a+');
        fwrite($file_loginput, "<?php \n");
        fwrite($file_loginput, '//@description:' . $_REQUEST['plugin_code'] . "\n");
        fwrite($file_loginput, '$_GET=' . var_export($_GET, true));
        fwrite($file_loginput, ";\n");
        fwrite($file_loginput, '$_POST=' . var_export($_POST, true));
        fwrite($file_loginput, ";\n");
        fwrite($file_loginput, '$_POST[\'gDossier\']=$gDossierLogInput;');
        fwrite($file_loginput, "\n");
        fwrite($file_loginput, '$_GET[\'gDossier\']=$gDossierLogInput;');
        fwrite($file_loginput, "\n");
        fwrite($file_loginput, ' $_REQUEST=array_merge($_GET,$_POST);');
        fwrite($file_loginput, "\n");
        fwrite($file_loginput, "include '" . basename(__FILE__) . "';\n");
        fclose($file_loginput);
    }
    $ext = new Extension($cn);
    if ($ext->search($_REQUEST['plugin_code']) != -1) {
        /* security */
        if (!isset($_SESSION['g_user']) || $ext->can_request($_SESSION['g_user']) == 0) {
            exit;
        }
        /* call the ajax script */
        require_once NOALYSS_PLUGIN . DIRECTORY_SEPARATOR . dirname(trim($ext->getp('me_file'))) . DIRECTORY_SEPARATOR . 'ajax.php';
    } else {
        alert(j(_("Cette extension n'existe pas ")));
        exit;
    }
}
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ajax.php


示例16: process

 public function process()
 {
     $Session = new Core\Session();
     $key = 'admincp_flavor_' . $this->request()->get('id');
     if ($flavor = $this->request()->get('flavor')) {
         $Session->set($key, $flavor);
     }
     $Theme = $this->template()->theme()->get($this->request()->get('id'));
     if ($flavor = $Session->get($key)) {
         $Theme->setFlavor($flavor);
     }
     if ($default = $this->request()->get('default')) {
         return $Theme->setDefault();
     } else {
         if ($flavorId = $this->request()->get('flavor-delete')) {
             $Session->remove($key);
             $Theme->deleteFlavor($flavorId);
             $this->url()->send('admincp.theme.manage', ['id' => $this->request()->get('id')], 'Flavor successfully deleted.');
         } else {
             if ($this->request()->get('export')) {
                 $Theme->export();
             } else {
                 if ($this->request()->get('merge')) {
                     $Theme->merge();
                     $this->url()->send('admincp.theme.manage', ['id' => $this->request()->get('id')], 'Successfully merged the theme.');
                 } else {
                     if ($this->request()->get('rebuild')) {
                         $Theme->rebuild();
                         $this->url()->send('admincp.theme.manage', ['id' => $this->request()->get('id')], 'Successfully merged the theme.');
                     }
                 }
             }
         }
     }
     $Service = new Core\Theme\Service($Theme);
     if ($design = $this->request()->get('design')) {
         $Service->design()->set($design);
         return ['posted' => true];
     }
     $Request = $this->request();
     if ($Request->getHeader('X-File-Name')) {
         $dir = PHPFOX_DIR_FILE . 'logos/';
         if (!is_dir($dir)) {
             mkdir($dir);
         }
         $file = uniqid() . '.' . \Phpfox_File::instance()->extension($Request->getHeader('X-File-Name'));
         if (isset($_FILES['ajax_upload'])) {
             $_FILES['image'] = $_FILES['ajax_upload'];
             file_put_contents($dir . $file, file_get_contents($_FILES['image']['tmp_name']));
         } else {
             file_put_contents($dir . $file, file_get_contents('php://input'));
         }
         $url = str_replace(['/index.php', 'http://'], ['', '//'], \Phpfox::getParam('core.path')) . 'PF.Base/file/logos/' . $file;
         return ['run' => "\$('input[name=\"design[logoUrl]\"]').val(\"'{$url}'\").trigger('change');"];
     }
     if ($load = $this->request()->get('load')) {
         if ($this->request()->isPost()) {
             $content = $this->request()->get('content');
             switch ($load) {
                 case 'html':
                     $Service->html()->set($content);
                     break;
                 case 'css':
                     $Service->css()->set($content);
                     break;
                 case 'javascript':
                     $Service->js()->set($content);
                     break;
             }
             return ['posting' => true];
         }
         $data = '';
         switch ($load) {
             case 'html':
                 $data = $Service->html()->get();
                 break;
             case 'css':
                 $data = $Service->css()->get();
                 break;
             case 'javascript':
                 $data = $Service->js()->get();
                 break;
         }
         return ['ace' => $data, 'run' => "\$AceEditor.mode('{$load}'); " . (string) j('.ace_editor')->data('ace-mode', $load)->data('ace-save', $this->url()->makeUrl('admincp.theme.manage', ['id' => $this->request()->get('id'), 'load' => $load]))];
     } else {
         $this->template()->assign('design', $Service->design()->get());
     }
     $this->template()->setTitle('Theme Manager');
     $this->template()->setTemplate('blank');
     $this->template()->setHeader(['colorpicker.css' => 'style_css', 'colorpicker/js/colpick.js' => 'static_script']);
     $this->template()->assign(['theme' => $Theme, 'flavors' => $Theme->flavors()]);
 }
开发者ID:lev1976g,项目名称:core,代码行数:92,代码来源:manage.class.php


示例17: h

<?php

$a++;
$b++;
$c++;
$d++;
$e = $f + 1;
$g;
h($i);
j($k);
开发者ID:exakat,项目名称:exakat,代码行数:10,代码来源:OneLineTwoInstructions.01.php


示例18: function

     }
     // Set the pages title, section title, h1 tag, sub-menu and template file
     return $Controller->section('PHPfox App Base', '/base')->h1('Forms', '/base/forms')->title('Forms')->menu($Base->menu())->render('forms.html', ['formData' => $formData]);
 });
 /**
  * @route /base/adding-a-feed
  * Learn how to add a new feed
  */
 (new Core\Route('/adding-a-feed', function (Core\Controller $Controller) use($Base) {
     // Check to see if we posted anything
     if ($Controller->request->isPost()) {
         $Feed = new \Api\Feed();
         // Create a new post. Make sure to pass your "type_id", which is your App id
         $feed = $Feed->post(['type_id' => 'PHPfox_Base', 'content' => $Controller->request->get('val')['status']]);
         // Use jquery to output the new feed object
         return j('#ajax_output')->html('<div class="message"><pre>' . print_r($feed, true) . '</pre></div>');
     }
     // Set the pages title, section title, h1 tag, sub-menu and template file
     return $Controller->section('PHPfox App Base', '/base')->h1('Adding a Feed', '/base/adding-a-feed')->title('Adding a Feed')->menu($Base->menu())->render('adding-a-feed.html', []);
 }))->auth(true);
 /**
  * @route /base/database
  * Small example of how to connect to a Model and run a function
  */
 new Core\Route('/database', function (Core\Controller $Controller) use($Base) {
     // Load our User Model, which will be located at: /PF.Site/PHPfox_Base/Model/User.php
     $User = new \Apps\PHPfox_Base\Model\User();
     // Run the random() function provded by the Model
     $randomUsers = $User->random();
     // Set the pages title, section title, h1 tag, sub-menu and template file
     return $Controller->section('PHPfox App Base', '/base')->h1('Database', '/base/forms')->title('Database')->menu($Base->menu())->render('database.html', ['users' => $randomUsers]);
开发者ID:cuteemo,项目名称:phpfox-base,代码行数:31,代码来源:start.php


示例19: alert

function alert($p_msg, $buffer = false)
{
    $r = '<script>';
    $r .= 'alert_box(\'' . j($p_msg) . '\')';
    $r .= '</script>';
    if ($buffer) {
        return $r;
    }
    echo $r;
}
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:10,代码来源:ac_common.php


示例20: setFn

 * @author [email protected]
 * @description
 * @package Codeine
 * @version 8.x
 */
setFn('Write', function ($Call) {
    if (is_scalar($Call['Value'])) {
        if (mb_strlen($Call['Value']) > $Call['Literal']['String']['Write Size']) {
            return mb_substr((string) $Call['Value'], 0, $Call['Literal']['String']['Write Size']);
        } else {
            return (string) $Call['Value'];
        }
    } elseif (is_null($Call['Value'])) {
        return null;
    } else {
        F::Log('Value not a string: ' . j($Call['Value']), LOG_WARNING);
        return null;
    }
});
setFn('Where', function ($Call) {
    //        if (is_string($Call['Value']))
    if (is_scalar($Call['Value'])) {
        return (string) htmlspecialchars($Call['Value']);
    } else {
        return null;
    }
});
setFn('Read', function ($Call) {
    //        if (is_string($Call['Value']))
    if (is_scalar($Call['Value'])) {
        if (mb_strlen($Call['Value']) > $Call['Literal']['String']['Read Size']) {
开发者ID:trickyplan,项目名称:codeine,代码行数:31,代码来源:String.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP jCnn函数代码示例发布时间:2022-05-15
下一篇:
PHP iunserializer函数代码示例发布时间: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