我通过点击该链接向我的用户的电子邮件发送链接以激活他的帐户.示例链接:http: //test.com/welcome/make_active_user/($ user_id)
然后我$user_id在我的控制器中编码,之后我的链接看起来像下面的那个
一切都很好.现在我想解码$user_id,但" /"符号创建问题.codeigniter只在" /"符号之前使用了那些字符.如何在没有" /"的情况下获得编码的user_id的输出
我$this->encrypt->encode($user_id,$key);在我的控制器中使用" "
请帮忙
我需要一些帮助。我想使用 codeigniter 在两个不同的目录中上传两个不同的文件。我在控制器中编写了以下代码。但它只会上传第一张图片。
public function save_product() {
$data = array();
$error = array();
$config1['upload_path'] = './manager/images/products/';
$config1['allowed_types'] = 'gif|jpeg|png|jpg';
$config1['max_size'] = '3000000';
$config1['max_width'] = '1024';
$config1['max_height'] = '768';
$this->load->library('upload', $config1);
$config2['upload_path'] = './manager/images/products/large/';
$config2['allowed_types'] = 'gif|jpeg|png|jpg';
$config2['max_size'] = '3000000';
$config2['max_width'] = '1024';
$config2['max_height'] = '768';
$this->load->library('upload', $config2);
if ((!$this->upload->do_upload('product_small_image')) && (!$this->upload->do_upload('product_large_image'))){
$error = array('error' => $this->upload->display_errors());
echo "<pre>";
print_r($error);
exit();
}
else {
$fdata = $this->upload->data();
$data['product_small_image'] = 'manager/images/products/' . $fdata['file_name'];
$data['product_large_image'] = 'manager/images/products/large/' . $fdata['file_name'];
$data['product_id'] = $this->input->post('product_id', TRUE); …Run Code Online (Sandbox Code Playgroud) 实时获取以下错误
“遇到PHP错误
严重性:核心警告
消息:模块'ffmpeg'已加载
文件名:未知行号:0
回溯::”。
但是我没有在本地主机中收到此错误。我正在使用codeigniter3。需要一些帮助。