我有这个Base64 PNG,我想解码到JPG.如果我转换为PNG它工作正常,使用:
list($type, $data) = explode(';', $data);
list(, $data) = explode(',', $data);
$data = base64_decode($data);
file_put_contents('myDirectory/filename.png', $data);
Run Code Online (Sandbox Code Playgroud)
但是,如果我尝试将其保存为JPG,则使用(MyDirectory/filename.jpg)以黑白方式显示.
如何将其转换为JPG?这是我的Base64 PNG的一个例子:
data:image/png;base64,iVBORw0KGgoAAAANSUhE...
Run Code Online (Sandbox Code Playgroud) 我有一个表格如下:
<table>
<tr>...<tr>
<tr>...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr class="replace">...<tr>
<tr>...<tr>
<tr>...<tr>
</table>
Run Code Online (Sandbox Code Playgroud)
使用jQuery和AJAX,我想<tr>用类名"replace"替换所有内容.
//$GLOBAL_includesPath = "http://localhost/smthing/";
<?
include_once $GLOBAL_includesPath.'global_menu.php';
?>
Run Code Online (Sandbox Code Playgroud)
错误:
警告:include_once()[function.include-once]:在第39行的C:\ xampp\htdocs\smthing\includes\page_header.php中,通过allow_url_include = 0禁用服务器配置中的http://包装器
警告:include_once(http://localhost/sthing/includes/global_menu.php)[function.include-once]:无法打开流:在C:\ xampp\htdocs\smthing\includes\page_header中找不到合适的包装器第39行的.php
警告:include_once()[function.include]:无法在C:\中打开'http://localhost/smthing/includes/global_menu.php'(include_path ='.; C:\ xampp\php\PEAR')第39行的xampp\htdocs\smthing\includes\page_header.php