Skip to content

Instantly share code, notes, and snippets.

View phpfact's full-sized avatar
🎯
Focusing

Sachin Sharma phpfact

🎯
Focusing
View GitHub Profile
#Prevent viewing of .htaccess file
<Files ~ "^.*\.([Hh][Tt][Aa])">
Order allow,deny
Deny from all
Satisfy all
</Files>
RewriteRule ^.*\.php$ – [F,L]
@extends('User.master',['menu'=>'webterminal'])
@section('title', 'web terminal title')
@section('custom-php') <<--------
<?php
/* */
?>
@endsection
/* All Events List in Webpage | Listing the events defined with the event attribute */
/* Javascript Events List Events Onclick list onclick events javscript events list, jquery events list list of all events in javascript */
https://www.sqlpac.com/en/documents/javascript-listing-active-event-listeners.html
https://gist.github.com/dmnsgn/36b26dfcd7695d02de77f5342b0979c7
https://gist.github.com/tkafka/1c5174ed5b446de7dfa4c04a3b09c95f
<?php
// PHP Time Format | php time format List | Date and Time in Php | Date Time Format Php
echo ini_get('date.timezone'); // read time zone from ini file OUTPUT :: Europe/Berlin
echo '<br><br>';
ini_set('date.timezone', 'Asia/Singapore'); // set ini file time zone
echo '<br><br>';
<?php
use Illuminate\Support\Facades\Mail;
function sendMail($to='example@test.com', $clientname='example name', $subject='example subject here', $emailtemplate='', $data=[])
{
$from = env('MAIL_FROM_ADDRESS');
Mail::send($emailtemplate, $data,
<?php
undefined variable in function php | Undefined variable problem with PHP function
#ReamMe : https://stackoverflow.com/questions/6058781/undefined-variable-problem-with-php-function
/* Error */
function sendMail($to='example@test.com', $clientname='example name', $subject='example subject here', $emailtemplate='', $data=[])
<?php
foreach($loginArr as $ulogin)
{
/* User Details From Api */
$GetDetailsApi = $MTRequest->Get("/api/user/get?login={$ulogin}");
if($GetDetailsApi)
{
$GetInit = json_decode($GetDetailsApi, true);
php -S localhost:8000
$ php -S localhost:8000
PHP 7.3.31 Development Server started at Mon Feb 28 10:31:20 2022
Listening on http://localhost:8000
Document root is E:\xampp_new\htdocs\mt5
@phpfact
phpfact / step.txt
Last active February 26, 2022 08:59
https://botble.com/the-best-way-to-install-our-script-on-a-shared-hosting
and
composer dump-autoload