Jump to content

Path looks Messy


unemployment

Recommended Posts

Just starting the path with a forward slash puts you in the root directory. So the full path would be something like:

/home/user/public_html/path/to/assets/init.inc.php

To which you could also set a definition for ease of future use:

<?php
define('ASSETS', '/home/user/public_html/awesome_app/views/assets/');

// so
include( /home/user/public_html/awesome_app/views/assets/init.inc.php );

// becomes
include( ASSETS . 'init.inc.php');

Link to comment
https://forums.phpfreaks.com/topic/264607-path-looks-messy/#findComment-1356209
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.