Skip to content

Instantly share code, notes, and snippets.

View mdmuzammalhoq's full-sized avatar
💭
Earning and Learning

MD. MUZAMMAL HOQ mdmuzammalhoq

💭
Earning and Learning
View GitHub Profile
ssh-keygen -t rsa -b 4096
vagrant up
vagrant destroy
vagrant halt
vagrant debug
vagrant ssh
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
For PHP version less than 5.2.6 try this:
@mdmuzammalhoq
mdmuzammalhoq / Email Php
Created June 11, 2019 09:16
How to send email via website using php
<?php
$n = "";
if(isset($_POST['submit'])){
$to = "coderssign@gmail.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$name = $_POST['name'];
$email = $_POST['email'];
$message = $name . " || " . $phone . " " . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $name . "\n\n" . $_POST['message'];
1. Git init
2. Git config --global user.name “username”
3. Git config --global user.email “email”
4. Git config –global user.name ================check username
5. Git config –global user.email ================check email
6. Touch text.txt ===================to create file
7. Notepad text.txt ============to open in notepad
8. Git status ================check status(track/untrack)
9. Git add text.txt
10. Git add . ================add all files
<?php
/**
*Session Class
**/
class Session{
public static function init(){
if (version_compare(phpversion(), '5.4.0', '<')) {
if (session_id() == '') {
session_start();
}
<?php
/**
* Format Class
*/
class Format{
public function formatDate($date){
return date('F j, Y, g:i a', strtotime($date));
}
public function textShorten($text, $limit = 400){
<?php
Class Database{
public $host = DB_HOST;
public $user = DB_USER;
public $pass = DB_PASS;
public $dbname = DB_NAME;
public $link;
public $error;
<?php
define("DB_HOST", "localhost");
define("DB_USER", "root");
define("DB_PASS", "");
define("DB_NAME", "your_db_name");
?>
<!-- Load TinyMCE -->
<script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
setupTinyMCE();
setDatePicker('date-picker');
$('input[type="checkbox"]').fancybutton();
$('input[type="radio"]').fancybutton();
});
</script>
<?php include 'config/config.php';?>
<?php include 'lib/Database.php';?>
<?php include 'helpers/formet.php'; ?>
<?php include 'inc/header.php'; ?>
<?php include 'inc/slider.php'; ?>
<?php
$db= new Database();
$fm= new Formet();