1/4 페이지 열람 중
FilesystemIteratorhttps://www.php.net/manual/en/class.filesystemiterator.phpList Files in a Directory in PHPhttps://code.tutsplus.com/how-to-list-files-in-a-directory-in-php--cms-38044t(PHP8)str_contains — Determine if a string contains a given substringhttps://www.php.net/manual/en/function.str-con…
Fibershttps://www.php.net/manual/en/language.fibers.php- 로직 실행 순서 결정 가능- Fiber 내부 함수 로직 실행결과 리턴값 받기 가능- 현재 실행을 일시 중지하고 다른 작업을 수행한 다음 현재 실행으로 돌아가는 구조화된 방법. <?php $fiber1 = new Fiber(function (int $parm): bool { sleep(1); echo "fiber1 parm => " . $parm . "\n"; e…
naver/smarteditor2https://github.com/naver/smarteditor2/tags[PHP] 네이버 스마트 에디터 2.0 써서 사진과 글 올리기https://onlyfor-me-blog.tistory.com/113SmartEditor2 사용자 가이드http://naver.github.io/smarteditor2/user_guide/
Slim4 session 적용index,php ... //session start session_set_cookie_params(['secure' => true, 'httponly' => true, 'samesite' => 'lax']); session_start(); // [■ Twig] Set view in Container ---------------------------------------- $container->set('view', function() { //$twig = Twig:…
Why avoiding LocalStorage for tokens is the wrong solutionhttps://pragmaticwebsecurity.com/articles/oauthoidc/localstorage-xss.htmlRefresh Token Rotationhttps://auth0.com/docs/secure/tokens/refresh-tokens/refresh-token-rotation
Configuring JITIn PHP 8.0, JIT is enabled by default, but turned off. Enabling JIT is easy, and only requires minimal INI configuration similar to this:------php.ini---------- [php-fpm 경우 php.ini 경로] =>/etc/php/8.1/fpm/php.ini;;;;;;;;;;;;;;;;;;;;;;; Dynamic Extensions ;;;;;;;;;;;;;;;;;;;;;;;zend…
ReactPHP Tutorialhttps://www.youtube.com/watch?v=mJFbYHYxSDg&list=PLKIEFFgNQYpVmUAKUjT_BRYYOdMHwGt0vhttps://www.youtube.com/watch?v=xv1_IhT-kiMNodeJs Socket.ioLearn Socket.io In 30 Minutes (NodeJS)https://www.youtube.com/watch?v=ZKEqqIO7n-kBuild a Real Time Chat App With Node.js And Socket.iohtt…
sprintf%0.8s <=== ?? <?php $ext = 'png'; $filename = 'filename'; echo sprintf('%s_%s.%0.8s', date("YmdHis"), $filename, $ext); // 20230104105802_filename.png echo '<br>'; echo sprintf('%s_%s.%0.2s', date("YmdHis"), $filename, $ext); // 20230104105917_filenam…
[PHP] function(){} 함수 안에 function(){} 함수 가능. ① -> ② <?php final class FileUploadAction { ① public function __invoke(Request $request, Response $response) { ② function moveUploadedFile(string $directory, UploadedFileInterface $uploadedFile) { //... //moveUploade…
Multiple constructors in PHPhttps://www.amitmerchant.com/multiple-constructors-php/ <?php class Animal { public function __construct() { $arguments = func_get_args(); $numberOfArguments = func_num_args(); if (method_exists($this, $function = '__construct'.$numberOfArgument…