⊗ppMVUFmRs 16 of 35 menu

Resources in MVC in PHP

When developing a website, some resources accessible via a direct link are required. These are CSS files, JavaScript files, images, and more. For such things, our framework has a folder /project/webroot/. Everything placed in this folder will be accessible via a direct link.

Let's, for example, connect a CSS file to our site. Let the name of this file be styles.css. Place this file in the webroot folder and connect it as follows:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="/project/webroot/styles.css"> <title><?= $title ?></title> </head> <body> ... </body> </html>

Connect some CSS file to your site. Check its functionality.

Place some image on your site. Check that it displays correctly on the site page.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline