Skip to content

Instantly share code, notes, and snippets.

@mehmetsarr
mehmetsarr / Ajax İle Post Gönderimi
Last active May 25, 2023 08:52
Codeigniter 4 Jquery Aynı Sayfada Post İşlemi
<form role="form" id="form1" name="form1" method="post">
<div class="form-group">
<label><?= _("Başlık") ?> </label>
<input type="text" name="baslik" placeholder="Başlık" class="form-control">
</div>
<div class="form-group">
<label><?= _("Açıklama") ?> </label>
<textarea name="aciklama" placeholder="Açıklama"></textarea>
</div>
<button type="submit" name="button" id="button"><?= _("GÖNDER") ?></button>
@mehmetsarr
mehmetsarr / CustomController.php
Created November 28, 2022 11:41
CodeIgniter 4 join İşlemi
<?php namespace App\Controllers;
use App\Models\CustomModel;
use App\Controllers\BaseController;
use CodeIgniter\Controller;
class Custom extends BaseController
{
public function index()
{
------------WORDPRESS---------------
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
<?php
// Check PHP version.
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
$minPhpVersion,
PHP_VERSION
);
# Disable directory browsing
Options -Indexes
# ----------------------------------------------------------------------
# Rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Cİ4 de yeni versiyonda verilen hatanın çözümü
güncel ci4 indirin.
app\Config girin
Kint.php açın.
İçindeki tüm kodları kopyalayıp eski dosyanın içine atıp kaydedin.
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
@mehmetsarr
mehmetsarr / Html botton print Code
Last active October 3, 2023 17:17
Html Print Button
<button class="btn btn-default" onclick="window.print()"><i class="fas fa-print"></i> Print</button>
@mehmetsarr
mehmetsarr / CodeIgniter 4 I sweetalert2 Kullanımı
Last active November 24, 2023 19:31
CodeIgniter 4 I sweetalert2 Kullanımı
</head> dan önce
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.js"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css"
id="theme-styles"
/>
yükleyin.
@mehmetsarr
mehmetsarr / HTML sayfasını JS ile PDF olarak kaydedin
Created November 25, 2023 09:44
HTML sayfasını JS ile PDF olarak kaydedin
---index.html---
<div id="content">
<h1>Page Title</h1>
<p>Page contents as below</p>
</div><div id="page"></div>
<button id="submit">Export to PDF</button>
--------------------------------------------