For PHP >= 5.3.0 try
PHP magic constants.
__DIR__
And make your path relative.
For PHP < 5.3.0 try
dirname(__FILE__)
More Related Contents:
- Weird l/r/trim() behaviour [closed]
- Combine multiple sql / mysql queries in one query
- Just using mysql real escape string [closed]
- URL rewriting with PHP
- Split a comma-delimited string into an array?
- Object of class mysqli_result could not be converted to string
- Why does PHP consider 0 to be equal to a string?
- Many-to-many relationships examples
- including a remote file in PHP
- MySQL Join two tables with comma separated values
- php date validation
- How to alias a table in Laravel Eloquent queries (or using Query Builder)?
- Do login forms need tokens against CSRF attacks?
- how to redirect STDOUT to a file in PHP?
- Fastest way to add prefix to array keys?
- configure multiple databases in zf2
- Check if specific input file is empty
- MySQL Performance – “IN” Clause vs. Equals (=) for a Single Value [duplicate]
- How to change PHP version used by composer
- PHP: Split string into array, like explode with no delimiter
- Creating anonymous objects in php
- Use a variable within heredoc in PHP
- imagecreatefromjpeg and similar functions are not working in PHP
- Group array values based on key in php? [duplicate]
- How to get attribute of node with namespace using SimpleXML? [closed]
- Display Php Array result in an Html table
- How to properly create HTML links in PHP?
- Limit String Length
- Large hex values with PHP hexdec
- PHP convert nested array to single array while concatenating keys?