The default output type is json, how to output html
jasen_1
jasen_1 2020-03-15 14:38:06
0
1
918

If 'default_return_type' => 'html', use the json() function in the return of the controller method to specify the output type as json,

Otherwise, 'default_return_type' => 'json', How does the controller specify html as the output type?

jasen_1
jasen_1

reply all(1)
jasen_1

I just took a closer look at the document and asked myself some questions. public function hello() {         $data = 'Hello,ThinkPHP!';         return response($data);   },

See the response output chapter.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!