프로그래밍/PHP 썸네일형 리스트형 php 천단위 콤마 찍기 php로 천단위 콤마 찍기 아래처럼 number_format() 을 사용하면 간단하게 적용됨. 빈 값이라면 숫자 0을 보여주고 천단위가 넘어가면 1,000 이런식으로 보여준다. 더보기 php 파일 업로드시 파일 디렉토리 변경 php 파일 업로드시 파일 경로 이동. $title_img = $_FILES['img_file']['name']; // 파일 이름 얻어오기 // Create target dir$root_path = $_SERVER["DOCUMENT_ROOT"]; // . 경로 알아내기$targetDir = $root_path . "/files/attach/images/228/". $last_num . "/"; // 지정할 경로 if (!file_exists($targetDir)) { . // 디렉토리 생성 @mkdir($targetDir);} $uploadFile = $targetDir . basename($_FILES['img_file']['name']); // 변수에 파일경로 및 파일 이름 저장// move_uplo.. 더보기 mysql 에서 mysqli로 변경시 Fatal error: Uncaught Error: Call to undefined function mysql_fetch_array() 에러시 //mysqlwhile($row= mysql_fetch_array($result1)) { } //mysqliwhile($row= mysqli_fetch_object($result1)) { } // 이렇게 수정 Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() //mysql$aaaa = mysql_num_rows($result_common); //mysqli$aaaa = mysqli_num_rows($result_common); // 이렇게 수정 더보기 이전 1 ··· 3 4 5 6 7 8 9 ··· 12 다음