Home > Article > Backend Development > Why is the grammar wrong here?
<code>class foo { public $hello = 'a'; public function m() { echo 'dsds'; } } $obj = new foo(); $obj->m(); </code>
Is it related to the virtual machine? Virtualbox 5.1
mounts a shared folder /mnt/shared
The same error is reported, I’m really confused!
ie 11 is also wrong, no cache
Win is running xampp
ubuntu is running nginx php5.6
win (host) and ubuntu (virtual machine) share folders at the same time C: workspace
There is still a problem after restarting the server, please cache the browser
The error still occurs when running on my computer
I suspect it is a problem with the editor??
<code>class foo { public $hello = 'a'; public function m() { echo 'dsds'; } } $obj = new foo(); $obj->m(); </code>
Is it related to the virtual machine? Virtualbox 5.1
mounts a shared folder /mnt/shared
The same error is reported, I’m really confused!
ie 11 is also wrong, no cache
Win is running xampp
ubuntu is running nginx php5.6
win (host) and ubuntu (virtual machine) share folders at the same time C: workspace
There is still a problem after restarting the server, please cache the browser
The error still occurs when running on my computer
I suspect it is a problem with the editor??
Thanks everyone, I found the problem. It was a syntax error caused by hidden characters
I copied your code and tried it, everything works fine. When you write, please note that the quotation marks must be in English.
There is no error. It may be caused by your browser cache. Try ctrl
+ F5
to force refresh the browser
Looks really right
Tested it, no problem.
Get up, drink a glass of water, smoke a cigarette, go to the toilet, come back and open it again. If it doesn’t work, change the browser.
Those inexplicable little problems are basically solved
Try replacing single quotes with double quotes
Why does the error message say ‘‘dsds’’ with two quotes
If you encounter this kind of problem, try formatting the code. It might be better to format the full-width characters into half-width characters.