Shorten url when linking files and pages with php

Asked

Viewed 59 times

1

Good afternoon, I need some help from you...I want to know how I can decrease the path of the url to link files and pages with php, for example, instead of typing something like: site.com.br/view/complements/css/style.css I wish I could shorten this, every time I link an image or something, the path becomes giant, someone can help me to proceed?

  • You can set a variable with the default link then just add what you want, for example, $urlPadrao = 'site.com.br/view/complements/'; $imagem = $urlPadrao.'css/styles.css' or use a __DIR__

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.