Tuesday, April 11, 2017

How to find the current file and directory?

<?php 
echo  __FILE__."<br/>";
echo dirname( __FILE__ ) . '\other.php'
?>
Output:
C:\phpProjects\examples\dirname.php
C:\phpProjects\examples\other.php

No comments:

Post a Comment

here docs

$x = <<<THE_END PHP stands for "PHP: Hypertext Preprocessor". The acronym "PHP" is therefore, usually referre...