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
ALTER USER 'Syfur'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; |
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 | |
$url = base_url().'index.php/controller_name/function_name'; | |
$ch = curl_init($url); | |
$id = 1; | |
$code = 'DHA'; | |
$myvars = 'id='.$id.'&code='.$code; | |
curl_setopt( $ch, CURLOPT_POST, 1); | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars); | |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt( $ch, CURLOPT_HEADER, 0); |
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 | |
$Msg = ""; | |
$row = $this->db->query("SELECT folder_name, file_name, uploaded_time FROM documents")->row(); | |
$folder_name = $row->folder_name; | |
$filename = $row->file_name; | |
$uploaded_time = $row->uploaded_time; | |
$file_path = getcwd().DIRECTORY_SEPARATOR.$folder_name.'/'.$filename; | |
if (file_exists($file_path)) { |
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 | |
echo implode('-', array_reverse(explode('/', $this->input->post('date')))); | |
/* Result: | |
2024-12-12 | |
*/ | |
?> |
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 | |
echo htmlspecialchars_decode(str_replace(array("\r\n", "\r", "\n"), "<br />", $var)); | |
?> |
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 | |
//only ajax request can connect this file | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') | |
{ | |
//CODE HERE | |
} | |
?> |
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 | |
$var = "SRSabc__098"; | |
echo preg_replace('/[^A-Za-z0-9]/', '', trim($var)); | |
/* | |
Result: | |
SRSabc098 | |
*/ | |
?> |
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 | |
$source = array( | |
array("1" => 5), | |
array("2" => 1525), | |
array("2" => 12365), | |
array("2" => 34234), | |
array("3" => 324234) | |
); | |
$result = array(); |
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 | |
echo htmlspecialchars(trim(preg_replace("/\r|\n|\r\n|\r\r/", " ", $input_var))); | |
?> |
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 convert_number_to_words($number) { | |
$hyphen = '-'; | |
$conjunction = ' and '; | |
$separator = ', '; | |
$negative = 'negative '; | |
$decimal = ' point '; | |
$dictionary = array( | |
0 => 'zero', |
NewerOlder