I am studying a code of other programmer. All are clear except the following line:

 $line_max = variable_get('user_import_line_max', 1000);

How this line exactly works. It does not make any sense to me. As far I know variable_get() is used to retrieve the value of variable_set(). But there is no variable_set() method in my module. If the above line simply assign 1000 to $line_max. Why $line_max=1000; was not used?

this may be a silly question but we have to undergo through this process. Please help me. Thanks in advance.

有帮助吗?

解决方案

Using variable_get() opens up the possibility of setting a variable elsewhere in code or in settings.php to set the preferred value. Using settings.php is as simple as adding

$conf['user_import_line_max'] = 500;

at the end of the settings.php file.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top