K
K
Konstantin Khairov2016-02-13 14:59:18
PHP
Konstantin Khairov, 2016-02-13 14:59:18

The imagecreatefromjpeg function does not work on Denwer, what should I do?

Hello everyone, I've run into this problem. On one PC the imagecreatefromjpeg function worked fine now moved to another PC everything was installed by Denver and so on. But here's the problem. Imagecreatefromjpeg function doesn't want to work

<?php

$images = imagecreatefromjpeg("image.jpg");

echo imageSX($images);


?>

A warning is issued when executing the script

Warning: imagecreatefromjpeg(image.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in O:\home\test1.ru\www\index.php on line 3
Warning: imagesx(): supplied argument is not a valid Image resource in O:\home\test1.ru\www\index.php on line 5

Please let me know if anyone has come across this problem.
PS I climbed in the search engines and the options from there did not come up.
Denwer 3
Windows 7
If you did not specify some important parameters, please write. I'm just learning PHP =)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Silm, 2016-02-13
@Kaylos

Let's start by getting rid of Denwer.
Second, make sure to give the function what it wants: "valid Image resource". Because in your error message it is clearly written that it receives something else.

M
Mikhail, 2016-02-13
@mix_gorbachev

correct image path

K
Konstantin Khairov, 2016-02-13
@Kaylos

I have nothing but Denver and nothing else. Always used it. Used Open Server a couple of times but it didn't work very well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question