vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Checking an include? (https://vborg.vbsupport.ru/showthread.php?t=54722)

colicab-d 06-25-2003 02:58 PM

Checking an include?
 
Ok just a quick wee question :D

How would I go about checking if GD was enabled using php,

Im writing a script that uses it at the moment and need to be able to have it print out the version of GD being used.

I als want to define extra conditions depending on the version enabled on the server.


i.e

PHP Code:

if($gdversion=="1.0"){
$enable false;



Xenon 06-25-2003 03:13 PM

there is a nice function gd_info :)

http://de2.php.net/manual/de/function.gd-info.php

filburt1 06-25-2003 03:44 PM

You can also tell if it exists at all via something like:
PHP Code:

if (function_exists("imagecreate")) // or function_defined 


Xenon 06-25-2003 08:18 PM

but that won't give him the version filbie ;)

assassingod 06-25-2003 08:25 PM

PHP Code:

<?php
        phpinfo
();
?>

Would work as well, tells you GD info there

colicab-d 06-25-2003 09:01 PM

lol yeah mate.. i need to get it as a variable in the code mate..

Lol I do know you can get via php info :D

S.Shady 06-25-2003 09:37 PM

im trtying to figure out how to install it on my localhost. anyone done it yet and can lead me in doing this ?

MUG 06-25-2003 09:39 PM

Quote:

Today at 12:13 PM Xenon said this in Post #2
there is a nice function gd_info :)

http://de2.php.net/manual/de/function.gd-info.php

That only works on 4.3.0 and above, where you can usually assume that the GD version is 2.0 :p

Brad 06-26-2003 12:56 AM

Mabey a admin controled switch like in vB 3? ;).

N!ck 06-26-2003 01:05 AM

Easiest solution to see if you have 2.0, IMO, follows.

PHP Code:

if (function_exists("imagealphablending"))
{
    
$enable=1;


Combined two ideas of filburt's. :)


All times are GMT. The time now is 11:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01129 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete