$ext1 = pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION); echo $ext1; // result : jpg $ext2 = pathinfo($_FILES['upload']['name']); print_r($ext2); /* result Array ( [dirname] => . [basename] => test.jpg [extension] => jpg [filename] => test ) */
var_dump(is_int(9223372036854775807)); 만약 true가 리턴된다면 64비트이고 false가 리턴된다면 32비트입니다. 이미 저 숫자가 2의 32승인 4,294,967,296 이 숫자를 넘어섰기 때문에... 참고로 2의 64승은 18,446,744,073,709,551,616입니다.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.' in /home/xxxxx/www/xxxx/xxxxx.p..
try { $pdo = new PDO("mysql:host=localhost; dbname=DBNAME; charset=utf8", "ID", "PASSWORD", [ PDO::MYSQL_ATTR_FOUND_ROWS => true, PDO::ATTR_EMULATE_PREPARES => true, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ]); //$pdo->exec("SET NAMES utf8"); } catch(PDOException $e) { die("Connection Failed : ".$e->getMessage()); } 자신의 호스팅에 설치된 PHP 버전이 5.3.6 ..
출처 : http://detectmobilebrowsers.com/
$str = "I love you"; echo preg_replace("/( \s*)+/", " ", $str);