在 Instagram 浏览器上遇到错误(在 Instagram 中打开网站进行浏览时)。特别是在 iPhone 设备上。
我想用两个函数创建两个不同大小的缩略图.uploadImage()生成大缩略图而uploadIhumb($ name){它在第一个函数内调用}创建小缩略图.第一个功能创建缩略图但第二个不起作用.请解决问题,并突出问题发生的地方?
enter code here:
function uploadImage()
{
$imageName2=$_FILES['file']['tmp_name'];
$config['image_library'] = 'gd2';
//$config['source_image'] = $imageName2;// this is temporary folder where image place on uploading time
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = false;
$config['width'] = 696;
$config['height'] = 241;
$config['new_image'] = 'images/uploads';
$this->load->library('image_lib', $config);
$this->image_lib->resize();
$file_name= basename( $imageName2, ".tmp");
$filename=$file_name.'_thumb.tmp';
////////////////////Rename code///////////////////////////
$name= $this->rand_string( 6 );
$dir=$_SERVER['DOCUMENT_ROOT'].'/images/uploads/';
rename($dir . $filename, $dir . $name);
echo $name;
$this->uploadIhumb($name); //FUNCTION CALL
}
function uploadIhumb($name)
{
$config['image_library'] = 'gd2';
$config['source_image'] = $_SERVER['DOCUMENT_ROOT'].'/images/uploads/'.$name;
$config['create_thumb'] = TRUE;
$config['width'] …
Run Code Online (Sandbox Code Playgroud) 我想为新闻订阅者添加两个自定义字段,客户订阅的日期及其IP地址:1)我在'newsletter_subscriber'表中添加了两列.如何实现这一目标?
在文件app/code/core/Mage/Newsletter/Model/Subscriber.php中,我发现了以下功能:
$this->setSubscriberEmail($email);
$this->setStoreId(Mage::app()->getStore()->getId());
$this->setCustomerId(0);
Run Code Online (Sandbox Code Playgroud)
但我没有找到它的代码.我想我也保存这样的数据但是如何可能?我必须为函数定义和声明代码,如$ this-> seSubscriptionDate();
以及如何在"通讯" - >"新闻稿订阅者"下的"管理"面板中显示?