Redirect / http://www.myphphelper.com/
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^olddomain\.com$ [NC] RewriteRule ^(.*)$ http://newdomain.com [R=301,L]
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
/* create zip folder */ public function zip(){ $getImage = $this->cart_model->getImage(); $zip = new ZipArchive; $auto = rand(); $file = date(“dmYhis”,strtotime(“Y:m:d H:i:s”)).$auto.’.zip’; if ($zip->open(‘./download/’.$file, ZipArchive::CREATE)) { foreach($getImage as $getImages){ $zip->addFile(‘./assets/upload/photos/’.$getImages->image, $getImages->image); } $zip->close(); $downloadFile = $file; $download = Header(“Location:http://localhost/projectname/download/”.$downloadFile); } }
public function image(){ $files = $_FILES; $cpt = count($_FILES[‘userfile’][‘name’]); for($i=0; $i<$cpt; $i++) { $_FILES[‘userfile’][‘name’]= time().$files[‘userfile’][‘name’][$i]; $_FILES[‘userfile’][‘type’]= $files[‘userfile’][‘type’][$i]; $_FILES[‘userfile’][‘tmp_name’]= $files[‘userfile’][‘tmp_name’][$i]; $_FILES[‘userfile’][‘error’]= $files[‘userfile’][‘error’][$i]; $_FILES[‘userfile’][‘size’]= $files[‘userfile’][‘size’][$i]; $this->upload->initialize($this->set_upload_options()); $this->upload->do_upload(); $fileName = $_FILES[‘userfile’][‘name’]; $images[] = $fileName; } $image = implode(‘,’,$images); $this->image_model->addimages($image); } Upload an image options public function set_upload_options() { $config = array(); $config[‘upload_path’] = ‘assets/upload/package/’; //give the path …
WordPress is an online, open source website creation tool written in PHP. But in non-geek speak, it’s probably the easiest and most powerful blogging and website content management system (or CMS) in existence today.
CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple …
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.