本文整理汇总了PHP中f::base64方法的典型用法代码示例。如果您正苦于以下问题:PHP f::base64方法的具体用法?PHP f::base64怎么用?PHP f::base64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类f
的用法示例。
在下文中一共展示了f::base64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testURI
public function testURI()
{
$expected = 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIdQTFRF/z08/wQD/2pp/42N/+3t/0lI/9XV/xAP//n5/w0M/2Rj/66u/yUk/0A//+fn/8/P/5aW/1ta//b2/3l4/4SE/21s/729/9LS/8bG/0NC/0xL/+rq/4GB//Dw/39+/zEw/xwb/wcG/1JR/xMS/6io/9jY/zQz/1hX/+Hh/7S0/8zM/wEA////1oK62gAAALtJREFUeNqsk9cSgjAQRUPvICD23t3N/3+fUREZ2ABxPC+ZZM7DzRbGe2Cqgj3pFExdQ8uWCq7hoEDTTVoIQixxDLctJBHWCIOGEPvYYG7XhGzsYYsyykuwkMSpBEYL+HfhYBzf7/tiRQopX2/EbzT/xkcSgfNlkZ7FQQu706d6s4sk5Pb+vMFCEpIBQCZuU4CcFK7fxtIZLKjIVQslaZbX3W70486BiRK1kRswtAPGvn9xBqzeL9v9EGAAi9+gVs3Ccg4AAAAASUVORK5CYII=';
$this->assertEquals($expected, f::base64(TEST_ROOT_ETC . DS . 'images' . DS . 'favicon.png'));
$expected = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIdQTFRF/z08/wQD/2pp/42N/+3t/0lI/9XV/xAP//n5/w0M/2Rj/66u/yUk/0A//+fn/8/P/5aW/1ta//b2/3l4/4SE/21s/729/9LS/8bG/0NC/0xL/+rq/4GB//Dw/39+/zEw/xwb/wcG/1JR/xMS/6io/9jY/zQz/1hX/+Hh/7S0/8zM/wEA////1oK62gAAALtJREFUeNqsk9cSgjAQRUPvICD23t3N/3+fUREZ2ABxPC+ZZM7DzRbGe2Cqgj3pFExdQ8uWCq7hoEDTTVoIQixxDLctJBHWCIOGEPvYYG7XhGzsYYsyykuwkMSpBEYL+HfhYBzf7/tiRQopX2/EbzT/xkcSgfNlkZ7FQQu706d6s4sk5Pb+vMFCEpIBQCZuU4CcFK7fxtIZLKjIVQslaZbX3W70486BiRK1kRswtAPGvn9xBqzeL9v9EGAAi9+gVs3Ccg4AAAAASUVORK5CYII=';
$this->assertEquals($expected, f::uri(TEST_ROOT_ETC . DS . 'images' . DS . 'favicon.png'));
}