最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Parse error: syntax error, unexpected ','

programmeradmin1浏览0评论

I have been following along a basic tutorial on creating a simple theme structure. I have searched quite a few articles to get an understanding and looked at debugging tips, however I am at a loss, probably due to me limited knowledge base. At this stage I had downloaded bootstrap css and js folders. This is on a local server and I don't have any plugins installed or activated.

After quite a number of error messages I have come down to this one. Sorry, I don't remember what changes I made in the functions file to get to this one.

Parse error: syntax error, unexpected ',' in D:\xampp\htdocs\myih\wp-content\themes\mytheme\functions.php on line 8 (line 8 starts at wp_register.....)

Thanks

I have been following along a basic tutorial on creating a simple theme structure. I have searched quite a few articles to get an understanding and looked at debugging tips, however I am at a loss, probably due to me limited knowledge base. At this stage I had downloaded bootstrap css and js folders. This is on a local server and I don't have any plugins installed or activated.

After quite a number of error messages I have come down to this one. Sorry, I don't remember what changes I made in the functions file to get to this one.

Parse error: syntax error, unexpected ',' in D:\xampp\htdocs\myih\wp-content\themes\mytheme\functions.php on line 8 (line 8 starts at wp_register.....)

Thanks

Share Improve this question edited Mar 8, 2020 at 3:05 banda asked Mar 8, 2020 at 2:58 bandabanda 32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You've got unbalanced and improperly placed closing parenthesis. There shouldn't be the closing parenthesis after the 'stylesheet'.

Because the closing parenthesis is there, the PHP processor thought that was the end of the function's parameters. Which caused the comma character after that to cause the error.

Watch the balancing of your parenthesis (and quotes) as you are writing your code.

发布评论

评论列表(0)

  1. 暂无评论