Problems encountered in the development of background management programs

problem: when adding a route dynamically, because all the data is obtained from the background, the component reference is a variable, but if you do the following, you will report an error, that is, you can"t find the module. It seems that require cannot reference a variable. I don"t know if there is any way to put a variable in require. That variable is the file address obtained from the database. The following figure is a logical

.

clipboard.png
red flag section. Will make mistakes, ask the boss to tell me the correct way


solved, it's your own problem


your r variable gets the path in front of .html, is to write less l

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32b83-2b5b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32b83-2b5b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?