简体   繁体   中英

Fatal error: Cannot redeclare imagecreatefrombmp()

I'm working on a simple imageboard based by TinyBoard (xampp), when I try to post with image, website gives me error for some reason:

Fatal error: Cannot redeclare imagecreatefrombmp() in C:\\xampp\\htdocs\\inc\\image.php on line 584

image.php:

[1]https://pastebin.com/xqj2NAuX

(584 line = 77 line)

PHP 7.2, any help?

ANSWER:

Just change the function name to something else on line 1:

function imagecreatefrombmp2($filename)

(from user3647971)

Just change the function name to something else on line 1 :

function imagecreatefrombmp2($filename) {

the error warns you that a function named exactly like this has already been declared. It's a built-in php function: http://php.net/manual/en/function.imagecreatefrombmp.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM