本文整理汇总了PHP中f::r302方法的典型用法代码示例。如果您正苦于以下问题:PHP f::r302方法的具体用法?PHP f::r302怎么用?PHP f::r302使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类f
的用法示例。
在下文中一共展示了f::r302方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sqlp
register_shutdown_function(function () {
sqlp('close');
sqlO('close');
});
#print_r($_ENV);
$_ENV['titre'] = 'mysqli object && flat php prepared statements, transactions';
require_once '../header.c.php';
echo '<pre>';
$x = sqlO('select id,id_season from articles order by id desc limit 1');
if ($x['#']) {
#has errors
if ($x['0']['error'] == 'No database selected') {
print_r($x);
die;
}
$fun->r302('sql6-cache.php?r=mysqli.php#migrations required');
}
/** creates required database && tables **/
print_r(['sqlTransaction1:select'] + compact('x'));
#ERRORS:$x['#"] && $x[$index][0]=is_numeric(ERRORLINE);
$x = sqlp('SELECT id,title,id_season from articles order by id desc limit ?', [1]);
print_r(['sqlp2'] + compact('x'));
$x = sqlO(['select id,id_season from articles order by id desc limit ?', 'insert into test.articles (title,id_season)values(?,?)'], [[1], ['--new2', 26]]);
print_r(['sqlTransaction2:select'] + compact('x'));
#fails & fails select as well !
$x = sqlO('insert into articles (title,id_season)values(?,?)', [['--new1', 24], ['--new2', 25], ['fail', 26]]);
print_r(['sqlTransaction1'] + compact('x'));
#fails !
$x = sqlO('insert into articles (title,id_season)values(?,?)', [['--new1', 24], ['--ok', 25]]);
print_r(['sqlTransaction3'] + compact('x'));
#ok
示例2: sql6
<?php
$fun = new f();
register_shutdown_function(function () {
global $fun;
if ($_GET['r']) {
$fun->r302($_GET['r'] . '#post required migration');
}
});
#print_r($_ENV);
$_ENV['titre'] = 'sql6-cached';
require_once '../header.c.php';
echo '<pre>';
#new fun;#ok with autoloader -- fine :)
new sql6();
#$con=[$host,$user,$pass];
$single = 1;
$cd = TMP . 'sqlcache/';
$con = $sqlconn;
$iP = ['databases'];
$pile = 'Database';
/*using $iP caches the results and index them under those names for cache invalidations*/
#sql6(['pl'=>['databases']]);die;
$sep = '§§!';
$migrations = ['0.0.1.createdb.test' => ['title' => "1st migration : creates database test && table products", 'precheck' => function () {
global $con;
$sql = 'show databases';
$iP = ['databases'];
$pile = 'Database';
$x = sql6(compact('con', 'iP', 'sql', 'pile'));
#,'pile'=>'Database'