Answer the question
In order to leave comments, you need to log in
How to write the path to the file?
Something I'm confused.
Previously, everywhere I wrote relative paths like this
include_once ('file.php');
include_once ('folder/file.php');
include_once (__DIR__.'file.php');
Answer the question
In order to leave comments, you need to log in
relative paths should not be used.
There are 2 ways to specify the path to the php file
1.
respectively, here the cron must access via http:// so that the apache server (nginx) creates this variable.
2.dirname(__FILE__)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question