Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
TinyPng

  • When i am compressing an image using tinypng, it shows the following error.

    Fuel\Core\PhpErrorException [ Warning ]:
    file_put_contents(http://localhost/test/public/assets/img/b6a098c9bcb580c61eab36334ce11f37.jpg): failed to open stream: HTTP wrapper does not support writeable connections

     public function toFile($path) {
    22        return file_put_contents($path$this->toBuffer());
    23    }

  • HarroHarro
    Accepted Answer
    Your "path" is not a path, it is a URL. And you can not write to a URL.

    Write to DOCROOT."assets/img/b6a098c9bcb580c61eab36334ce11f37.jpg" instead.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion