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


PHP cv函数代码示例

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


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

示例1: get_unpack

function get_unpack($k, $char_rep, $pos_link, $h)
{
    $g = ord("g");
    $f = explode("return p}", $h);
    $e = explode("'.split", $f[$k]);
    $t = $e[0];
    $a = explode(";", $t);
    //print_r($a); //for debug only
    $w = explode("|", $a[$char_rep]);
    //char list for replace
    $t1 = explode("'", $a[$pos_link]);
    // where is final link
    $fl = $t1[3];
    $s1 = explode("/", $fl);
    $r = "";
    for ($i = 0; $i < strlen($fl) - 1; $i++) {
        if (preg_match("/[A-Za-z0-9_]/", $fl[$i])) {
            $m = $w[cv($fl[$i])];
            if ($m == "") {
                $m = $fl[$i];
            }
            $r = $r . $m;
        } else {
            $r = $r . $fl[$i];
        }
    }
    return $r;
}
开发者ID:anboto,项目名称:xtreamer-web-sdk,代码行数:28,代码来源:index.php

示例2: index

 public function index()
 {
     if (cv('virtual.temp')) {
         header('location: ' . $this->createPluginWebUrl('virtual/temp'));
         exit;
     } else {
         if (cv('virtual.category')) {
             header('location: ' . $this->createPluginWebUrl('virtual/category'));
             exit;
         }
     }
 }
开发者ID:ChainBoy,项目名称:wxfx,代码行数:12,代码来源:web.php

示例3: generate_rss

 function generate_rss($channel, $items)
 {
     $str = "<?xml version=\"1.0\" encoding=\"" . RSS_ENCODING . "\" ?>\n<rss version=\"2.0\">\n\t<channel>\n";
     foreach ($channel as $key => $value) {
         $str .= "\t\t<{$key}>" . cv($value) . "</{$key}>\n";
     }
     foreach ($items as $item) {
         $str .= "\t\t<item>\n";
         foreach ($item as $key => $value) {
             $str .= "\t\t\t<{$key}>" . cv($value) . "</{$key}>\n";
         }
         $str .= "\t\t</item>\n";
     }
     $str .= "\t</channel>\n</rss>\n";
     return $str;
 }
开发者ID:bianle,项目名称:www2,代码行数:16,代码来源:www2-rss.php

示例4: index

 public function index()
 {
     global $_W;
     if (cv('verify.keyword')) {
         header('location: ' . $this->createPluginWebUrl('verify/keyword'));
         exit;
     } else {
         if (cv('verify.saler')) {
             header('location: ' . $this->createPluginWebUrl('verify/saler'));
             exit;
         } else {
             if (cv('verify.store')) {
                 header('location: ' . $this->createPluginWebUrl('verify/store'));
                 exit;
             }
         }
     }
 }
开发者ID:noikiy,项目名称:mygit,代码行数:18,代码来源:web.php

示例5:

if (cv('perm.user')) {
    ?>
<li <?php 
    if ($_GPC['method'] == 'user') {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    echo $this->createPluginWebUrl('perm/user');
    ?>
">操作员管理</a></li><?php 
}
?>
    <?php 
if (cv('perm.log')) {
    ?>
<li <?php 
    if ($_GPC['method'] == 'log') {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    echo $this->createPluginWebUrl('perm/log');
    ?>
">操作日志</a></li><?php 
}
?>
    
    <?php 
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:tabs.tpl.php

示例6: ini_set

// ADAPTED FROM tools/scripts/phpunit
ini_set('safe_mode', 0);
ini_set('include_path', dirname(__DIR__) . PATH_SEPARATOR . ini_get('include_path'));
#  Relying on system timezone setting produces a warning,
#  doing the following prevents the warning message
if (file_exists('/etc/timezone')) {
    $timezone = trim(file_get_contents('/etc/timezone'));
    if (ini_set('date.timezone', $timezone) === FALSE) {
        echo "ini_set( 'date.timezone', '{$timezone}' ) failed\n";
    }
}
# Crank up the memory
ini_set('memory_limit', '2G');
define('CIVICRM_TEST', 1);
eval(cv('php:boot --level=settings', 'phpcode'));
if (CIVICRM_UF === 'UnitTests') {
    CiviTester::builder()->apply();
}
// ------------------------------------------------------------------------------
/**
 * Call the "cv" command.
 *
 * @param string $cmd
 *   The rest of the command to send.
 * @param string $decode
 *   Ex: 'json' or 'phpcode'.
 * @return string
 *   Response output (if the command executed normally).
 * @throws \RuntimeException
 *   If the command terminates abnormally.
开发者ID:konadave,项目名称:civicrm-core,代码行数:30,代码来源:bootstrap.php

示例7:

    if ($set['moneydeduct'] == 1) {
        ?>
开启<?php 
    } else {
        ?>
关闭<?php 
    }
    ?>
</div>
                           <?php 
}
?>
                       </div>
                   </div>
                   <?php 
if (cv('sale.deduct.save')) {
    ?>
                <div class="form-group"></div>
                   <div class="form-group">
                           <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                           <div class="col-sm-9 col-xs-12">
                                 <input type="submit" name="submit"  value="保存设置" class="btn btn-primary"/>
                                 <input type="hidden" name="token" value="<?php 
    echo $_W['token'];
    ?>
" />
                           </div>
                    </div>
                <?php 
}
?>
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:deduct.tpl.php

示例8:

            <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                         <?php 
        if (cv('commission.agent.edit|commission.agent.check')) {
            ?>
                            <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1"  />
                            <input type="hidden" name="token" value="<?php 
            echo $_W['token'];
            ?>
" />
                        <?php 
        }
        ?>
                       <input type="button" name="back" onclick='history.back()' <?php 
        if (cv('commission.agent.edit|commission.agent.check')) {
            ?>
style='margin-left:10px;'<?php 
        }
        ?>
 value="返回列表" class="btn btn-default" />
                    </div>
            </div>


        </div>


    </div>   
   
</form>
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:agent.tpl.php

示例9: rapidmov

function rapidmov($string)
{
    $h = file_get_contents($string);
    $g = ord("g");
    $f = explode("return p}", $h);
    $e = explode("'.split", $f[1]);
    $t = $e[0];
    $a = explode(";", $t);
    $w = explode("|", $a[9]);
    $t1 = explode("'", $a[4]);
    $fl = $t1[3];
    $s1 = explode("/", $fl);
    $r = "";
    for ($i = 0; $i < strlen($fl) - 1; $i++) {
        if (preg_match("/[A-Za-z0-9_]/", $fl[$i])) {
            $r = $r . $w[cv($fl[$i])];
        } else {
            $r = $r . $fl[$i];
        }
    }
    return $r;
}
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:22,代码来源:link.php

示例10:

} else {
    ?>
        <div class='form-control-static'><?php 
    echo $set['share_desc'];
    ?>
</div>
        <?php 
}
?>
    </div>
</div>
               <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部版权</label>
                <div class="col-sm-9 col-xs-12">
                       <?php 
if (cv('creditshop.set.save')) {
    ?>
        <textarea name="setdata[copyright]" class="form-control" ><?php 
    echo $set['copyright'];
    ?>
</textarea>
             <?php 
} else {
    ?>
        <div class='form-control-static'><?php 
    echo $set['copyright'];
    ?>
</div>
        <?php 
}
?>
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:set.tpl.php

示例11:

            <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                           <?php 
        if (ce('creditshop.adv', $item)) {
            ?>
                            <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1"  />
                            <input type="hidden" name="token" value="<?php 
            echo $_W['token'];
            ?>
" />
                        <?php 
        }
        ?>
                       <input type="button" name="back" onclick='history.back()' <?php 
        if (cv('creditshop.adv.add|creditshop.adv.edit')) {
            ?>
style='margin-left:10px;'<?php 
        }
        ?>
 value="返回列表" class="btn btn-default" />
                    </div>
            </div>
                
                
            </div>
        </div>
         
    </form>
</div>
开发者ID:ChainBoy,项目名称:wxfx,代码行数:30,代码来源:adv.tpl.php

示例12: pay_weixin

                    ?>
             <input type="submit" name="submit_pay" value="打款到微信钱包" class="btn btn-primary col-lg-1" style='margin-left:10px;' onclick='return pay_weixin()'/>
             <?php 
                }
                ?>
             <?php 
            }
            ?>
        <?php 
        }
        ?>
        <?php 
        if ($apply['status'] == -1) {
            ?>
           <?php 
            if (cv('commission.apply.cancel')) {
                ?>
            <input type="submit" name="submit_cancel" value="重新审核" class="btn btn-default col-lg-1"  onclick='return cancel()'/>
            <?php 
            }
            ?>
     
        <?php 
        }
        ?>
        
        <input type="button" class="btn btn-default" name="submit" onclick="history.go(-1)" value="返回" style='margin-left:10px;' />
        <input type="hidden" name="token" value="<?php 
        echo $_W['token'];
        ?>
" />
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:apply.tpl.php

示例13: array

                    ?>
" title='发送'><i class='fa fa-send'></i></a></td><?php 
                }
                ?>
                    </tr>
                    <?php 
            }
        }
        ?>
                 
                </tbody>
            </table>
  
         </div>
         <?php 
        if (cv('tmessage.add')) {
            ?>
           <div class='panel-footer'>
                            <a class='btn btn-default' href="<?php 
            echo $this->createPluginWebUrl('tmessage', array('op' => 'post'));
            ?>
"><i class="fa fa-plus"></i> 添加新模版</a>
         </div>
         <?php 
        }
        ?>
     </div>
       </form>
 
<?php 
    } else {
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:message.tpl.php

示例14: ini_set

<?php

ini_set('memory_limit', '2G');
ini_set('safe_mode', 0);
eval(cv('php:boot --level=classloader', 'phpcode'));
/**
 * Call the "cv" command.
 *
 * @param string $cmd
 *   The rest of the command to send.
 * @param string $decode
 *   Ex: 'json' or 'phpcode'.
 * @return string
 *   Response output (if the command executed normally).
 * @throws \RuntimeException
 *   If the command terminates abnormally.
 */
function cv($cmd, $decode = 'json')
{
    $cmd = 'cv ' . $cmd;
    $descriptorSpec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => STDERR);
    $oldOutput = getenv('CV_OUTPUT');
    putenv("CV_OUTPUT=json");
    $process = proc_open($cmd, $descriptorSpec, $pipes, __DIR__);
    putenv("CV_OUTPUT={$oldOutput}");
    fclose($pipes[0]);
    $result = stream_get_contents($pipes[1]);
    fclose($pipes[1]);
    if (proc_close($process) !== 0) {
        throw new RuntimeException("Command failed ({$cmd}):\n{$result}");
    }
开发者ID:civicrm,项目名称:api4,代码行数:31,代码来源:bootstrap.php

示例15: array

        }
        ?>
                  <tr>
                    <td colspan='9'>
                          <?php 
        if (cv('shop.goods.add')) {
            ?>
                          <a class='btn btn-default' href="<?php 
            echo $this->createWebUrl('shop/goods', array('op' => 'post'));
            ?>
"><i class='fa fa-plus'></i> 添加商品</a>
                          <?php 
        }
        ?>
                          <?php 
        if (cv('shop.goods.edit')) {
            ?>
                          <input name="submit" type="submit" class="btn btn-primary" value="提交排序">
                           <input type="hidden" name="token" value="<?php 
            echo $_W['token'];
            ?>
" />
                           <?php 
        }
        ?>
                           
                    </td>
                </tr>
                
                </tr>
                </tbody>
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:goods.tpl.php


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