Ask a question about PHP
In a PHP file, the following content is included
#!/usr/bin/php
My PHP code
?>
Question A: What does the phrase "#!/usr/bin/php" mean. Because generally we are in the browser through the HTTP protocol to access.
This is done through the Ejabberd 1 "built-in programs" to call this file.
Question B: On the basis of question A, what if you should do it under Windows?
Share to:
------Solution--------------------
is to tell the system what it does with it.
It is usually used in cron. You can also save from not writing
------Solution--------------------
can be removed directly. No, it's all you need.
But in Linux you have to specify PHP to execute the script.
------Solution--------------------
Does this thing still work in Linux today? Have to ask the girl moderator
#!/usr/bin/php
Indicate which software to use to execute the subsequent code, and of course you must set the file to be executable
Equivalent to
/usr/bin/php filename.php
There's this mechanism in window, but you have a similar wording.
@REM
?>