Skip to content

Monster Oasis

  • 浪況預測
  • KML2CSV
  • World Marathon
  • Privacy Policy

Programming/php

nginx php 增加/改變檔案上傳的大小 settings

2025/03/04 by Monster

nginx.conf in http block
sendfile on;
client_max_body_size 10M;

php.ini
file_uploads = On
upload_max_filesize = 20M

Categories Copy_N_Paste, Programming/php, Service, Software, System/Linux/Unix* Tags Nginx, php

[memo] My KV database compare

2023/08/192020/10/21 by Monster

Read more

Categories Programming/php, System/Linux/Unix* Tags array, bdb, cachelite, redis

[PHP] php 由 pipe (stdin) 讀進檔案 再做處理, 類似 C 的 pipe line 方法

2023/08/192019/12/27 by Monster
$cnt = 0;
$fp = fopen('php://stdin','r');
while ($line = stream_get_line($fp, 65535, "\n")) {
  echo "LINE #" . (++$cnt) . ": " . $line . "\n";
}

Categories Programming/php Tags php

[PHP] Native SQLRELAY connect / query sample code

2018/09/07 by Monster

Read more

Categories Copy_N_Paste, Programming/php Tags helloworld, oracle, sqlrelay

webhd.monster.tw : Use docker , nextcloud (a dropbox like web storage opensource) …. and docker startup commands …

2017/01/012017/01/01 by Monster

URL: https://webhd.monster.tw/

Read more

Categories Programming/php, Service, System/Linux/Unix* Tags copypaste, docker, dropbox

[memo] 在 PHP 使用 ssh tunnel 連接遠端的 mysql server

2016/02/072016/02/05 by Monster

 

Screenshot 2016 02 05 20 42 26

Read more

Categories Programming/php, Software Tags ssh, tunning

PECL PHP REDIS client library phpredis

2016/01/02 by Monster

URL : https://github.com/phpredis/phpredis#classes-and-methods

redis.ini file in /etc/php5/conf.d with the following contents: extension=redis.so

Categories Programming/php, System/Linux/Unix* Tags php, redis

[PHP] Sample code : Berkeley DB , bdb , dba_open , db4 , key-value database ,

2015/05/13 by Monster
$id = dba_open("bdb4_tsid.db", "w", "db4");

if (!$id) { echo "dba_open failed\n"; exit; }

dba_replace("key", "This is an example!", $id);

if (dba_exists("key", $id)) {
        echo dba_fetch("key", $id);
        dba_delete("key", $id);
}

dba_close($id);

Screenshot 2015 05 13 20 28 39

 

 

Screenshot 2015 05 13 20 37 56

 

This is an example!
exist:
This is an example!
---> This is an example!

Categories DATABASE, Programming/php Tags bdb, DATABASE, php

PHP Regex Validation of Hexadecimal Values / check hex number

2015/05/10 by Monster
preg_match( '/^[A-F0-9]{15,18}/',$v)

 

Screenshot 2015 05 10 10 53 23

Categories Programming/php Tags php

PHP 的 mktime , time format , 週編號 , week number of year, weeks starting on Monday

2015/02/122015/02/06 by Monster

Screenshot 2015 02 06 15 31 50

 

1419696000
52 - 2014-12-29 00:00:00
52 - 2014-12-30 00:00:00
52 - 2014-12-31 00:00:00
00 - 2015-01-01 00:00:00
00 - 2015-01-02 00:00:00
00 - 2015-01-03 00:00:00
00 - 2015-01-04 00:00:00
01 - 2015-01-05 00:00:00
01 - 2015-01-06 00:00:00
01 - 2015-01-07 00:00:00

Categories Programming/php Tags php, Programming/php
Older posts
Page1 Page2 … Page11 Next →
© 2025 Monster Oasis • Built with GeneratePress