ThinkPHP cannot output pictures and set response headers

Today, I wrote a PHP generated image. I want to view it with the browser, but every time I open it, it is a string of random code. It looks like the binary data of the image source. Then I checked that the response header is text/html. Then I clearly set image/jpeg header("Content-type", "image/jpeg"); This shows that TP sets text/html by defau ...

Posted by OldManRiver on Sat, 21 May 2022 08:34:57 +0300

DIY implements thinkephp core framework Composer

What is Composer? Composer is a tool used by PHP to manage dependencies. It can automatically install these dependent library files. In addition, composer can automatically load classes and create its own packages. Installation of Composer Very simple. Implement automatic loading of classes Create composer.com in / home/web/mytp directory JSO ...

Posted by tripleM on Thu, 19 May 2022 20:23:47 +0300