No products in the cart.
Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
-
nick-surmanidze
ParticipantFor retrieving the path you can use a function
<?php $path = get_home_path(); ?>
. I do not want to just repeat what had been already said here, but I want to add one more thing:If you are using windows server, which is rare case for WordPress installation, but still happens sometimes, you might face a problem with the path output. It might miss a “\” somewhere and you will get an error if you will be using such a path. So when outputting make sure to sanitize the path:
<?php $path = get_home_path(); $path = wp_normalize_path ($path); // now $path is ready to be used :) ?>
- AuthorPosts
Viewing 1 post (of 1 total)