$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>php - Parse error: syntax error, unexpected ','|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin8PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far