php - path of a script from another one -
i have structure:
-folder1    -folder2       -script1.php    -folder3       -script2.php now i'm trying call script1 script2:
// script2.php file_get_contents(" path ? "); note: path doesn't work /folder1/folder2/script1.php/. can writing plus domain name this:
http://example.com/folder1/folder2/script1.php/ but want know how can without writing domain name?
in script 2 can use:
file_get_contents("../folder2/script1.php"); or can include script 1 in script 2:
include("../folder2/script1.php"); better approach create class.
Comments
Post a Comment