php가 gd 라이브러리를 지원하지 않는 문제에 대한 해결책: 먼저 "php.ini" 파일을 찾아서 연 다음 ";extension=php_gd2.dll"을 찾은 다음 마지막으로 선행 세미콜론을 제거합니다. 변경 사항.
권장: "PHP 튜토리얼"
Windows에서 PHP의 GD 라이브러리 지원을 활성화
php.ini를 찾아 콘텐츠를 열고 다음을 찾으세요.
;extension=php_gd2.dll
앞에 세미콜론 ";"을 넣으세요. 처음에 세미콜론이 없으면 이미 활성화되어 있다는 의미입니다.
Linux
#开启GD库支持有以下几种方法 ##检测GD库是否安装命令 php5 -m | grep -i gd
or
php -i | grep -i --color gd ##如未安装GD库,则为服务器安装,方法如下 ### 如果是源码安装,则加入参数 --with-gd ### 如果是debian系的linux系统,用apt-get安装,如下 apt-get install php5-gd ### 如果是CentOS系的系统,用yum安装,如下 yum install php-gd ### 如果是suse系的linux系统,用yast安装,如下 yast -i php5_gd ### 如果嫌这个世界不够蛋疼呢,可以在原先编译PHP不支持GD的情况下附加
에서 PHP의 GD 라이브러리 지원을 활성화합니다. 먼저 zlib 소스 코드, libpng 소스 코드, gd 소스 코드
압축을 풀고 소스 코드 디렉터리
zlib 디렉터리
./configure --prefix=/usr/local/zlib make ; make install make clean
libpng로 이동합니다. 디렉토리
cp scripts/makefile.linux ./makefile ./configure --prefix=/usr/local/libpng make ; make install make clean
g d 디렉토리
./configure --prefix=/usr/local/libgd --with-png=/usr/local/libpng make ; make install make clean
마지막으로 php.ini에서 [gd]를 검색한 후 아래 줄을 추가하세요
extension=/usr/local/libgdgd.so
그런 다음 PHP 서비스를 다시 시작하고 그래도 작동하지 않으면 재부팅해 보세요
좋아요. 마지막으로 이 세상에는 많은 일이 있다는 것을 아셔야 합니다. 의외로 소스 코드 설치와 gd 라이브러리만 추가하는 경우 PHP 버전과 라이브러리 버전이 다릅니다
, 그래서:
- 있습니다. 노력 끝에 돌아올 것이라는 보장은 없습니다
- gd가 성공적으로로드된다는 보장은 없습니다.so
- 임신에 대한 보장은 없습니다
그래서 소스 코드 설치라면 가장 좋습니다 PHP를 컴파일할 때 --with-gd
GD 라이브러리 함수
GetImageSize 作用:取得图片的大小[即长与宽] 用法:array GetImageSize(string filename, array [imageinfo]); ImageArc 作用:画弧线 用法:int ImageArc(int im, int cx, int cy, int w, int h, int s, int e, int col); ImageChar 作用:写出横向字符 用法:int ImageChar(int im, int font, int x, int y, string c, int col); ImageCharUp 作用:写出竖式字符 用法:int ImageCharup(int im, int font, int x, int y, string c, int col); ImageColorAllocate 作用:匹配颜色 用法:int ImageColorAllocate(int im, int red, int green, int blue); ImageColorTransparent 作用:指定透明背景色 用法:int ImageColorTransparent(int im, int [col]); ImageCopyResized 作用:复制新图并调整大小 用法:int ImageCopyResized(int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); ImageCreate 作用:建立新图 用法:int ImageCreate(int x_size, int y_size); ImageDashedLine 作用:绘虚线 用法:int ImageDashedLine(int im, int x1, int y1, int x2, int y2, int col); ImageDestroy 作用:结束图形 用法解释:int ImageDestroy(int im); ImageFill 作用:图形着色 用法:int ImageFill(int im, int x, int y, int col); ImageFilledPolygon作用:多边形区域着色 用法:int ImageFilledPolygon(int im, array points, int num_points, int col); ImageFilledRectangle作用:矩形区域着色 用法:int ImageFilledRectangle(int im, int x1, int y1, int x2, int y2, int col); ImageFillToBorder作用:指定颜色区域内着色 用法:int ImageFillToBorder(int im, int x, int y, int border, int col); ImageFontHeight 作用:取得字型的高度 用法:int ImageFontHeight(int font); ImageFontWidth作用:取得字型的宽度 用法:int ImageFontWidth(int font); ImageInterlace作用:使用交错式显示与否 用法:int ImageInterlace(int im, int [interlace]); ImageLine作用:绘实线 用法:int ImageLine(int im, int x1, int y1, int x2, int y2, int col); ImageLoadFont作用:载入点阵字型 用法:int ImageLoadFont(string file); ImagePolygon作用:绘多边形 用法:int ImagePolygon(int im, array points, int num_points, int col); ImageRectangle作用:绘矩形 用法:int ImageRectangle(int im, int x1, int y1, int x2, int y2, int col); ImageSetPixel作用:绘点 用法:int ImageSetPixel(int im, int x, int y, int col); ImageString 作用:绘横式 字符串 用法:int ImageString(int im, int font, int x, int y, string s, int col); ImageStringUp作用:绘直式字符串 用法:int ImageStringUp(int im, int font, int x, int y, string s, int col); ImageSX 作用:取得图片的宽度 用法:int ImageSX(int im); ImageSY 作用:取得图片的高度 用法:int ImageSY(int im); ImageTTFBBox 作用:计算 TTF 文字所占区域 用法:array ImageTTFBBox(int size, int angle, string fontfile, string text); ImageTTFText作用:写 TTF 文字到图中 用法:array ImageTTFText(int im, int size, int angle, int x, int y, int col, string fontfile, string text); ImageColorAt 作用:取得图中指定点颜色的索引值 用法:int ImageColorAt(int im, int x, int y); ImageColorClosest 作用:计算色表中与指定颜色最接近者 用法:int ImageColorClosest(int im, int red, int green, int blue); ImageColorExact 作用:计算色表上指定颜色索引值 用法:int ImageColorExact(int im, int red, int green, int blue); ImageColorResolve 作用:计算色表上指定或最接近颜色的索引值 用法:int ImageColorResolve(int im, int red, int green, int blue); ImageColorSet 作用:设定色表上指定索引的颜色 用法:boolean ImageColorSet(int im, int index, int red, int green, int blue); ImageColorsForIndex 作用:取得色表上指定索引的颜色 用法:array ImageColorsForIndex(int im, int index); ImageColorsTotal 作用:计算图的颜色数 用法:int ImageColorsTotal(int im); ImagePSLoadFont 作用:载入 PostScript 字型 用法 :int ImagePSLoadFont(string filename); ImagePSFreeFont 作用:卸下 PostScript 字型 用法:void ImagePSFreeFont(int fontindex); ImagePSEncodeFont 作用:PostScript 字型转成向量字 用法:int ImagePSEncodeFont(string encodingfile); ImagePSText作用:写 PostScript 文字到图中 用法:array ImagePSText(int image, string text, int font, int size, int foreground, int background, int x, int y, int space, int tightness, float angle, int antialias_steps); ImagePSBBox作用:计算 PostScript 文字所占区域 用法: array ImagePSBBox(string text, int font, int size, int space, int width, float angle); ImageCreateFromPNG作用:取出 PNG 图型 用法:int ImageCreateFromPng(string filename); ImagePNG作用:建立 PNG 图型 用法:int ImagePng(int im, string [filename]); ImageCreateFromGIF作用:取出 GIF 图型 用法:int ImageCreateFromGif(string filename); ImageGIF作用:建立 GIF 图型 用法:int ImageGif(int im, string [filename]);매개변수를 추가하려면
위 내용은 PHP가 gd 라이브러리를 지원하지 않으면 어떻게 해야 합니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

이 기사는 산 및 기본 데이터베이스 모델을 비교하여 특성과 적절한 사용 사례를 자세히 설명합니다. 산은 금융 및 전자 상거래 애플리케이션에 적합한 데이터 무결성 및 일관성을 우선시하는 반면 Base는 가용성 및

이 기사는 코드 주입과 같은 취약점을 방지하기 위해 PHP 파일 업로드 보안에 대해 설명합니다. 파일 유형 유효성 검증, 보안 저장 및 오류 처리에 중점을 두어 응용 프로그램 보안을 향상시킵니다.

기사는 내장 함수 사용, 화이트리스트 접근 방식 및 서버 측 유효성 검사와 같은 기술에 중점을 둔 보안을 향상시키기 위해 PHP 입력 유효성 검증에 대한 모범 사례를 논의합니다.

이 기사는 토큰 버킷 및 누출 된 버킷과 같은 알고리즘을 포함하여 PHP에서 API 요율 제한을 구현하고 Symfony/Rate-Limiter와 같은 라이브러리 사용 전략에 대해 설명합니다. 또한 모니터링, 동적 조정 요율 제한 및 손도 다룹니다.

이 기사에서는 PHP에서 암호를 보호하기 위해 PHP에서 Password_hash 및 Password_Verify 사용의 이점에 대해 설명합니다. 주요 주장은 이러한 기능이 자동 소금 생성, 강한 해싱 알고리즘 및 Secur를 통해 암호 보호를 향상 시킨다는 것입니다.

이 기사는 PHP 및 완화 전략의 OWASP Top 10 취약점에 대해 설명합니다. 주요 문제에는 PHP 응용 프로그램을 모니터링하고 보호하기위한 권장 도구가 포함 된 주입, 인증 파손 및 XSS가 포함됩니다.

이 기사는 PHP의 XSS 공격을 방지하기위한 전략, 입력 소독, 출력 인코딩 및 보안 향상 라이브러리 및 프레임 워크 사용에 중점을 둔 전략에 대해 설명합니다.

이 기사는 각각의 사용시기에 중점을 둔 PHP의 인터페이스 및 추상 클래스 사용에 대해 설명합니다. 인터페이스는 관련없는 클래스 및 다중 상속에 적합한 구현없이 계약을 정의합니다. 초록 클래스는 일반적인 기능을 제공합니다


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기
