No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
假設你已經在 Ubuntu 上安裝好了 Nginx 、 Php8.0、 VSCODE,那麼我們就可以專注在如何讓你的 VSCODE 可以對 PHP 除錯
sudo apt install php-xdebug
對應 Php8.0 的環境下,會安裝對應不同 php 版本的 mods ,我的環境下安裝的是 PHP 8.1 版本,路徑是 /etc/php/8.1/mods-available/
2. 更改 xdebug.ini 的設定
sudo /etc/php/8.1/mods-available/xdebug.ini
3. 將 xdebug.ini 內容改成
zend_extension = xdebug.so xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_handler = dbgp xdebug.remote_host = 172.17.0.1 ;指定vscode所在的IP xdebug.remote_connect_back = 1 ;如果為1,則會忽略remote_host xdebug.remote_port = 9000 xdebug.remote_log = "/var/log/xdebug.log"
4. 重新啟動服務
sudo systemctl start php8.0-fpm sudo systemctl start nginx
5. 要讓 VSCODE 支援 PHP Debug ,要先安裝 php debug

6. 安裝完畢後,在 PHP 的專案目錄下要建立 launch.json 讓除錯器知道要連線到那裏
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
}
]
}到這裡,就可以用你的 VSCODE 去除錯你的 PHP CODE 了
BAT 又稱注意力幣,是用來獎勵廣告觀看戶的獎勵貨幣,廣告主投了一檔廣告,除了出版商以外,用戶的眼球使用時間不應該被白白浪費,而是應該被合理獎勵
打賞和給小費
BAT 是 Brave Ads 用得貨幣,可以在網路上看到你喜歡內容的時候,給予作者BAT幣作為獎勵,也可以透過 Brave Browser 瀏覽網頁時候看廣告而由廣告主那邊獲得 BAT 幣,當然你也可以成為 Youtuber 然猴加入 Brave Ads 賺取廣告分潤
brave.com
從來沒有看廣告這麼開心的,也從廣告那邊學了很多知識,終於瞭解了知識就是力量,力量是可以賺錢的。
勇敢的瀏覽器
我想 Brave 是要你勇敢地跟 Edge 和 Chrome 說分手,發好人卡,可以想像用 Brave Browser 看 Youtube 可以邊看邊賺錢?為何創作者可以拿廣告費,我付出我的眼球和生命,卻都是別人賺走,有 Brave Browser 可以讓生態圈更健全更健康
可以來這邊註冊,讓 Youtube 或是 Twitch 多一份收入
安裝好瀏覽器一定要馬上去建立錢包,看著錢越來越多就是種快樂
有了 BAT 幣,要記得連接交易所,以後可以換現金出來
最新、最好用的流量瀏覽器,這邊下廣告,100%是給想要看到廣告的人

WooCommerce PDF Invoices & Packing Slips
其實這套免費的 PDF 發票、撿貨單,超多人使用,但可惜的一點是沒法顯示亞洲的字型,但其實她們也都知道有這些問題,早就都留有解決方案,解決的步驟如下
先看原廠的寫的中文支援解決方案文章,
將 Plugin 中的 wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/ 下面的資料全部複製一份到 wp-content/themes/my-(child)theme-folder/woocommerce/pdf/my-template/
可以用原廠推薦中文字型,可以採用 adobe 或是 google 的開放字型,但要注意的是目前只支援 ttf 檔案格式的字型,下載完畢後要解壓縮並且放到 wp-content/themes/my-(child)theme-folder/woocommerce/pdf/my-template/fonts 中
找到 template 下的 style.css 並且多加入下面的程式碼
/* Load font */
@font-face {
font-family: 'MyFont';
font-style: normal;
font-weight: normal;
src: local('MyFont'), local('MyFont'), url(<?php echo $this->get_template_path(); ?>/fonts/myfont.ttf) format('truetype');
}
@font-face {
font-family: 'MyFont';
font-style: normal;
font-weight: bold;
src: local('MyFont Bold'), local('MyFont-Bold'), url(<?php echo $this->get_template_path(); ?>/fonts/myfont-bold.ttf) format('truetype');
}
@font-face {
font-family: 'MyFont';
font-style: italic;
font-weight: normal;
src: local('MyFont Italic'), local('MyFont-Italic'), url(<?php echo $this->get_template_path(); ?>/fonts/myfont-italic.ttf) format('truetype');
}
@font-face {
font-family: 'MyFont';
font-style: italic;
font-weight: bold;
src: local('MyFont Bold Italic'), local('MyFont-BoldItalic'), url(<?php echo $this->get_template_path(); ?>/fonts/myfont-bolditalic.ttf) format('truetype');
}並且找到 style.css 中的 body 區段,並且將字型指向 MyFont
body {
background: #fff;
color: #000;
margin: 0cm;
font-family: 'MyFont';
/*font-family: 'Open Sans', sans-serif;*/
/* want to use custom fonts? http://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/ */
font-size: 9pt;
line-height: 100%; /* fixes inherit dompdf bug */
}要回到進入外掛後台,並且在 template 中選剛剛建好的模板,並且啟用 Enable font subsetting,可以降低 PDF 文件大小

雖然說網路上開店最棒的優勢就是可以 24 x 7 的不間斷賺錢,但是如果是線下升級成線上的店家們,會需要配合公司政策,一天開店八小時,假日不開店或是配合結帳時間,月底不收單等
以下示範每個月25號到月底作帳時間內,不讓客戶下單的寫法
// 啟動商店的假日檔
add_action ('init', 'qqqtips_woocommerce_holiday_mode');
// Disable Cart, Checkout, Add Cart
// 將下單相關的按鈕都關閉
function qqqtips_woocommerce_holiday_mode() {
//remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
//remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
//remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
//remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
add_filter( 'woocommerce_is_purchasable', '__return_false'); //
add_action( 'woocommerce_before_main_content', 'qqqtips_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_cart', 'qqqtips_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_checkout_form', 'qqqtips_wc_shop_disabled', 5 );
}
// Show Holiday Notice
// 每月25號關帳,次月1號打開
function qqqtips_wc_shop_disabled() {
$qqq_today = number_format(date('d'));
if( $qqq_today >= 25 && $qqq_today <= 31) {
wc_print_notice( '店家已經關帳,請下個月再來!', 'error');
}
} Open Close Store Hours for WooCommerce
在試用了將近半年的 Visual Studio 2022 Preview,終於等到了 Visual Studio 2022 正式版上市的這天,看了 Visual Studio 2022 的新功能 介紹,重點落於
AI 時代來了,用語音寫程式,只要寫幾行程式,AI 機器人自動就幫你完成後面的 Code,這些都已經實現了,未來已經到來.
每三年一次改版,每次都有非常好的體驗,配合 .NET 6 的推出,效能又網上了不只一階,檔案存取的效率增加了15-30%,JSON Class 轉換的效率也有明顯的改善,Hot Reload in ASP.NET 和 C++,更好的支援 Linux 和 GitHub。
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
近期留言