一月 12, 2023 • 沒有評論 PHP Read CSV File

<?php $csv_file = "https://example.com/filename.csv?" . time(); $data_list = array(); if (($handle = fopen($csv_file, "r")) !==...

閱讀內文
十二月 16, 2022 • 沒有評論 PHP Shorthand

$get_name = (isset($_GET["name"])) ? $_GET["name"] : ""; Related Keywords: Developer, How-to, Solved, PHP Shorthand, Single-Line,...

閱讀內文
九月 1, 2022 • 沒有評論 WordPress Do WP_Query via Custom Ajax Function

<?php // functions.php function do_wp_query_via_ajax(){ //ini_set('display_errors', 1); //ini_set('display_startup_errors', 1); //error_reporting(E_ALL); // Endpoint: /wp-admin/admin-ajax.php?action=do_wp_query_via_ajax…

閱讀內文
九月 1, 2022 • 沒有評論 WordPress Get / Check User Roles

<?php // functions.php function imnobby_check_user_roles(){ $user_id = get_current_user_id(); $user_info = get_userdata( $user_id ); //$user_roles =...

閱讀內文
七月 26, 2022 • 沒有評論 Firebase SDK PHP Basic Get and Set Operations

<?php // https://github.com/ktamas77/firebase-php require './vendor/autoload.php'; use Firebase\FirebaseLib; const URL = 'https://your-firebase-account.firebaseio.com/'; const TOKEN = 'your-firebase-token';...

閱讀內文
六月 24, 2022 • 沒有評論 PHP Snappy Starter Sample Code on Windows XAMPP

<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require 'vendor/autoload.php'; use Knp\Snappy\Pdf; $snappy = new Pdf('C:\"Program Files"\wkhtmltopdf\bin\wkhtmltopdf.exe');…

閱讀內文
六月 23, 2022 • 沒有評論 WordPress Ajax Get Remote Image Hook

<?php function ajax_get_remote_image(){ // Endpoint: /wp-admin/admin-ajax.php?action=ajax_get_remote_image&q= $tmphtml = ''; if ( !isset($_GET["q"]) ) exit; $url...

閱讀內文