- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP – How to get or set the path of a domain?
The bindtextdomain() function in PHP is used to set or get the path of a domain.
Syntax
string bindtextdomain($str_domain, $str_directory)
Parameters
bindtextdomain() accepts two parameters −
$str_domain − This is the domain.
$str_directory − This is the directory path. If the directory path is NULL, then it will return the currently set directory.
Return Values
bindtextdomain() returns the full specified pathname for the domain which is currently set. It will return False on the failure.
Example
<?php // domain of the app $str_domain = 'xampp'; // It will return the domain path echo bindtextdomain($str_domain,'C:\xampp\htdocs'); ?>
Output
C:\xampp\htdocs
Advertisements