This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a folder named as **uploads** | |
# HTML | |
<html lang="en"> | |
<head> | |
<title>PHP and jQuery - Crop Image and Upload using Croppie plugin</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function unique_multidim_array($array, $key) { | |
$temp_array = array(); | |
$i = 0; | |
$key_array = array(); | |
foreach($array as $val) { | |
if (!in_array($val[$key], $key_array)) { | |
$key_array[$i] = $val[$key]; | |
$temp_array[$i] = $val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function instagram(){ | |
$access_token = 'xxxxxx'; | |
$fullendpoint = 'https://api.instagram.com/v1/users/self/media/recent/'; | |
$endpoint = 'users/self/media/recent/'; | |
$params = array( | |
'access_token' => $access_token, | |
'count' => '10', | |
'min_tag_id' => '', | |
'max_tag_id' => '' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**In order to use mod_rewrite you can type the following command in the terminal:** | |
# Unable rewrite mode | |
sudo a2enmod rewrite | |
# Disable rewrite mode | |
sudo a2dismod rewrite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*CkEditor config.js */ | |
CKEDITOR.replace( "short_desc", { | |
filebrowserBrowseUrl: 'http://example.com/ckfinder/ckfinder.html', | |
filebrowserImageBrowseUrl: 'http://example.com/ckfinder/ckfinder.html?Type=Images', | |
filebrowserUploadUrl: 'http://example.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', | |
filebrowserImageUploadUrl: 'http://example.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', | |
filebrowserWindowWidth: '1000', | |
filebrowserWindowHeight: '700' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nextKeyday = strtotime('Mon'); | |
$nextWeek = strtotime("+7 day",$nextKeyday); | |
echo date('Y-m-d',$nextWeek); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Online PHP Script Execution</title> | |
</head> | |
<body> | |
<?php | |
$day = Date('N',strtotime('2019-03-13 02:00:00')); | |
$weekArr = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; | |
$newDaysArr=[]; | |
foreach($weekArr as $key=>$val){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arr = [ | |
"0": [ | |
"id": 1, | |
"schedule_time": "01:01 AM", | |
"day": "Thu" | |
], | |
"1": [ | |
"id": 2, | |
"schedule_time": "04:00 AM", | |
"day": "Sun" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
require_once(dirname(__FILE__).'/vendor/PHPExcel.php'); | |
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_sqlite3; | |
if (!PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) { | |
die($cacheMethod . " caching method is not avaiLabel" . EOL); | |
} | |
$objPHPExcel = new PHPExcel(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function sendmail($maildata, $to, $subject, $attachments = []) | |
{ | |
require_once(APPPATH.'third_party/PHPMailer/PHPMailerAutoload.php'); | |
//Create a new PHPMailer instance | |
$mail = new PHPMailer; | |
$mail->SMTPOptions = array( | |
'ssl' => array( | |
'verify_peer' => false, | |
'verify_peer_name' => false, |