“@/path/to/a/file” in PHP, what does it mean?

前端 未结 3 1802
遥遥无期
遥遥无期 2021-01-27 17:02

I have stumbled to following code example:

$image = \'file/path\';
$code = $tmhOAuth->request(\'POST\', \'https://upload.twitter.com/1/statuses/update_with_me         


        
3条回答
  •  灰色年华
    2021-01-27 17:40

    Looking at the code in the question, the '@' sign is just part of a string variable. It has no special meaning to PHP as a language.

    It might have special meaning to the code which it is being passed to, but it isn't anything to PHP other than a simple string variable that happens to start with an '@' sign.

    From the context, I guess presumably it's being passed to Twitter as part of a JSON object. In that case, it might have a special meaning to Twitter, but I don't know the API, so I couldn't tell you that for certain. In any case, it's not a PHP question.

提交回复
热议问题