Ask a php related question

Source: Internet
Author: User
Ask a php question in a php file, including the following content #! /Usr/bin/php & lt ;? Php // my & nbsp; php code? & Gt; question A: Could you tell me this sentence "#! What does/usr/bin/php mean. Because we generally ask a php question through the http protocol in the browser.
A php file contains the following content:
#! /Usr/bin/php
// My php code
?>

Question A: Could you tell me this sentence "#! What does/usr/bin/php mean. Because we generally access the service through the http protocol in a browser.
Here, the file is called through an "embedded program" of ejabberd.
Question B: Based on question A, what should I do in windows?
Shared to: Question A: Could you tell me this sentence "#! What does/usr/bin/php mean. Because we generally use data-pics = ''>
------ Solution --------------------
This is to tell the system what to execute.
It is generally used in cron. You can also skip writing.
------ Solution --------------------
You can remove it directly. No.
However, in linux, you must specify php to execute the script.
------ Solution --------------------
Is this item still valid in linux? You have to ask Niu's moderator.

#! /Usr/bin/php
Specifies the software used to execute the code. of course, this file must be set to executable.
Equivalent
/Usr/bin/php filename. php

Windows does have this mechanism, but you have similar statements.
@ REM
 @ REM ='
@ Set phpcli = \ AMP \ php54 \ php.exe
@ REM phpcli the path of your clim php.exe
@ % PHPCLI % 0
@ Goto: EOF
@ REM ';?>
Echo "\ rHello World ";
Exec ("pause ");
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.