本文整理汇总了PHP中XUtils::b64encode方法的典型用法代码示例。如果您正苦于以下问题:PHP XUtils::b64encode方法的具体用法?PHP XUtils::b64encode怎么用?PHP XUtils::b64encode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XUtils
的用法示例。
在下文中一共展示了XUtils::b64encode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionHome
/**
* 主界面
*/
public function actionHome()
{
$data['soft'] = 'bagecms';
$data['softVersion'] = $this->_bagecms;
$data['softRelease'] = $this->_bagecmsRelease;
$data['serverSoft'] = $_SERVER['SERVER_SOFTWARE'];
$data['serverOs'] = PHP_OS;
$data['phpVersion'] = PHP_VERSION;
$data['fileupload'] = ini_get('file_uploads') ? ini_get('upload_max_filesize') : '禁止上传';
$data['serverUri'] = $_SERVER['SERVER_NAME'];
$data['maxExcuteTime'] = ini_get('max_execution_time') . ' 秒';
$data['maxExcuteMemory'] = ini_get('memory_limit');
$data['magic_quote_gpc'] = MAGIC_QUOTE_GPC ? '开启' : '关闭';
$data['allow_url_fopen'] = ini_get('allow_url_fopen') ? '开启' : '关闭';
$data['excuteUseMemory'] = function_exists('memory_get_usage') ? XUtils::byteFormat(memory_get_usage()) : '未知';
$dbsize = 0;
$connection = Yii::app()->db;
$sql = 'SHOW TABLE STATUS LIKE \'' . $connection->tablePrefix . '%\'';
$command = $connection->createCommand($sql)->queryAll();
foreach ($command as $table) {
$dbsize += $table['Data_length'] + $table['Index_length'];
}
$mysqlVersion = $connection->createCommand("SELECT version() AS version")->queryAll();
$data['mysqlVersion'] = $mysqlVersion[0]['version'];
$data['dbsize'] = $dbsize ? XUtils::byteFormat($dbsize) : '未知';
$notebook = Admin::model()->findByPk($this->_admini['userId']);
$env = XUtils::b64encode(serialize($data));
$this->render('home', array('notebook' => $notebook, 'env' => $env, 'server' => $data));
}
示例2: foreach
<?php
foreach ((array) $row['subFileList'] as $subrow) {
?>
<tr class="tb_list">
<td style="padding:0 0 0 20px"><?php
echo $subrow;
?>
</td>
<td ><a href="<?php
echo $this->createUrl('updateTpl', array('filename' => XUtils::b64encode($row['fileName'] . '/' . $subrow)));
?>
"><img src="<?php
echo $this->_baseUrl;
?>
/static/admin/images/update.png" align="absmiddle" /></a> <a href="<?php
echo $this->createUrl('batch', array('command' => 'deleteFile', 'fileName' => XUtils::b64encode($row['fileName'] . '/' . $subrow)));
?>
" class="confirmSubmit"><img src="<?php
echo $this->_baseUrl;
?>
/static/admin/images/delete.png" align="absmiddle" /></a></td>
</tr>
<?php
}
?>
<?php
}
?>
</form>
</table>
<?php
示例3: _form
private function _form($links)
{
if (!empty($links['mix']) && !XUtils::isUtf8($links['mix'])) {
$links['mix'] = XUtils::autoCharset($links['mix']);
}
if (!empty($links['title']) && !XUtils::isUtf8($links['title'])) {
$links['title'] = XUtils::autoCharset($links['title']);
}
$links['mix'] = empty($links['mix']) ? null : XUtils::b64encode($links['mix']);
//先判断是外链图片还是本地图片
$imgtype = reqPost('imgtype', null);
// ppr($_POST,1);
if (!empty($imgtype)) {
if ($imgtype == 'local') {
$links['image_link'] = $this->_doLocalImage('image_link');
}
if (empty($links['image_link'])) {
$links['image_link'] = null;
}
}
$links['begin_time'] = empty($links['begin_time']) ? 0 : strtotime($links['begin_time']);
$links['end_time'] = empty($links['end_time']) ? 0 : strtotime($links['end_time']);
// ppr($links_arr,1);
$links['create_time'] = $this->_thetime;
$links['user_id'] = $this->_backendUserId;
return $links;
}
示例4: foreach
?>
/assets/images/folder.gif" align="absmiddle" /> <?php
echo $row['fileName'];
?>
</td>
</tr>
<?php
foreach ((array) $row['subFileList'] as $subrow) {
?>
<tr class="tb_list">
<td style="padding:0 0 0 34px"><?php
echo $subrow;
?>
</td>
<td><a href="<?php
echo $this->createUrl('updateTpl', array('filename' => XUtils::b64encode($row['fileName'] . '/' . $subrow)));
?>
"><img src="<?php
echo Yii::app()->baseUrl;
?>
/assets/images/update.png" align="absmiddle" style="" /> 编辑</a> <a href="/static/admin/images/delete.png" align="absmiddle" /></a></td>
</tr>
<?php
}
?>
<?php
}
?>
<?php
}
?>