Learning Laravel103 Setup 103 Server Requirements 103 Local Development Server 104 Hello World Example (Basic) and with using a view 104 Hello World Example (Basic) 105 Web Server Configuration for Pretty URLs 105 Running the application 111 Using a different server 111 Requirements 112 Hello World Example (Using Controller and View) 113 Hello World Example (Basic) 114 Installation using LaraDock (Laravel Homestead Chapter 33: Installation Guide 116 Remarks 116 Examples 116 Installation 116 Hello World Example (Basic) 117 Hello World Example With Views and Controller 117 The view 117 The controller 117 The0 码力 | 216 页 | 1.58 MB | 1 年前3
The PHP Handbook
first PHP program When learning a new programming language we have this tradition of creating a “Hello, World!” application. Something that prints those strings. Make sure MAMP is running, and open the “Welcome to MAMP” page you saw in the browser. Delete everything and replace that with: Hello World'; ?> Save, refresh the page on http://localhost:8888, you should see this: 12 Great! That from the basics. For example, something like this will give you the same result in the browser: Hello To the final user, that looks at the browser and has no idea of the code0 码力 | 97 页 | 8.78 MB | 1 年前3
Guzzle PHP 6.5 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); $promise = $clien // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data0 码力 | 65 页 | 311.42 KB | 11 月前3
Guzzle PHP 7.0 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); $promise = $clien // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data0 码力 | 64 页 | 310.93 KB | 11 月前3
Guzzle PHP 7.0 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); $promise = $client // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload 'form_params' => [ 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data POST requests)0 码力 | 50 页 | 235.39 KB | 11 月前3
Guzzle PHP 6.5 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); $promise = $client // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload 'form_params' => [ 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data POST requests)0 码力 | 50 页 | 237.04 KB | 11 月前3
Laravel 5.0 Documentation
a URI and a Closure : Route::get('/', function() { return 'Hello World'; }); Route::post('foo/bar', function() { return 'Hello World'; }); Route::put('foo/bar', function() { // }); Rou // }); Route::match(['get', 'post'], '/', function() { return 'Hello World'; }); Route::any('foo', function() { return 'Hello World'; }); Often, you will need to generate URLs to your routes, to a Response instance using the withCookie method: $response = new Illuminate\Http\Response('Hello World'); $response->withCookie(cookie('name', 'value', $minutes)); Flashing Input To The Session0 码力 | 242 页 | 1.44 MB | 1 年前3
Guzzle PHP v5 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); // Or, if you don't // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload 'form_params' => [ 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data POST requests)0 码力 | 49 页 | 231.08 KB | 11 月前3
Guzzle PHP v5 DocumentationGuzzleHttp\Psr7\Request; // Create a PSR-7 request object to send $headers = ['X-Foo' => 'Bar']; $body = 'Hello!'; $request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body); // Or, if you don't // Use the stream_for() function to create a PSR-7 stream. $body = \GuzzleHttp\Psr7\stream_for('hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to 'field_name' => 'abc', 'other_field' => '123', 'nested_field' => [ 'nested' => 'hello' ] ] ]); Sending form files You can send files along with a form (multipart/form-data0 码力 | 62 页 | 309.78 KB | 11 月前3
Laravel 5.1 中文文档路由接收一个 URI 和一个闭包: Route::get('/', function () { return 'Hello World'; }); Route::post('foo/bar', function () { return 'Hello World'; }); Route::put('foo/bar', function () { // }); Route::match(['get', 'post'], '/', function () { return 'Hello World'; }); 或者,还可以使用 any 方法注册一个路由响应所有 HTTP 动作: Route::any('foo', function () { return 'Hello World'; }); 生成路由对应的 URLs 可以使用帮助函数 url 来生成路由对应的 cookies 通过 withCookie 方法被 附加到 Illuminate\Http\Response 实例: $response = new Illuminate\Http\Response('Hello World'); $response->withCookie(cookie('name', 'value', $minutes)); return $response; 想要创建一个长期有效的0 码力 | 307 页 | 3.46 MB | 1 年前3
共 69 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













