@@ -56,9 +56,9 @@ not feel like a good abstraction, does it? We still have the ``send()`` method
56
56
for all pages, our pages do not look like templates and we are still not able
57
57
to test this code properly.
58
58
59
- Moreover, adding a new page means that we need to create a new PHP script,
60
- which name is exposed to the end user via the URL
61
- (``http://127.0.0.1:4321/bye.php ``): there is a direct mapping between the PHP
59
+ Moreover, adding a new page means that we need to create a new PHP script, the name of
60
+ which is exposed to the end user via the URL
61
+ (``http://127.0.0.1:4321/bye.php ``). There is a direct mapping between the PHP
62
62
script name and the client URL. This is because the dispatching of the request
63
63
is done by the web server directly. It might be a good idea to move this
64
64
dispatching to our code for better flexibility. This can be achieved by routing
@@ -105,7 +105,7 @@ In the ``front.php`` script, ``$map`` associates URL paths with their
105
105
corresponding PHP script paths.
106
106
107
107
As a bonus, if the client asks for a path that is not defined in the URL map,
108
- we return a custom 404 page; you are now in control of your website.
108
+ we return a custom 404 page. You are now in control of your website.
109
109
110
110
To access a page, you must now use the ``front.php `` script:
111
111
@@ -133,7 +133,7 @@ its sub-directories (only if needed -- see above tip).
133
133
argument is the URL path you want to simulate.
134
134
135
135
Now that the web server always accesses the same script (``front.php ``) for all
136
- pages, we can secure the code further by moving all other PHP files outside the
136
+ pages, we can secure the code further by moving all other PHP files outside of the
137
137
web root directory:
138
138
139
139
.. code-block :: text
@@ -151,7 +151,7 @@ web root directory:
151
151
└── front.php
152
152
153
153
Now, configure your web server root directory to point to ``web/ `` and all
154
- other files won't be accessible from the client anymore .
154
+ other files will no longer be accessible from the client.
155
155
156
156
To test your changes in a browser (``http://localhost:4321/hello?name=Fabien ``),
157
157
run the :doc: `Symfony Local Web Server </setup/symfony_server >`:
@@ -166,7 +166,7 @@ run the :doc:`Symfony Local Web Server </setup/symfony_server>`:
166
166
various PHP files; the changes are left as an exercise for the reader.
167
167
168
168
The last thing that is repeated in each page is the call to ``setContent() ``.
169
- We can convert all pages to "templates" by just echoing the content and calling
169
+ We can convert all pages to "templates" by echoing the content and calling
170
170
the ``setContent() `` directly from the front controller script::
171
171
172
172
// example.com/web/front.php
0 commit comments