提交表单 全局变量未定义! php4.4.0 +apache2+zend1.3
/*test1.c*/
#include
uclinux中的makefile ,全局变量MAKE在哪定义的 应该在某个文件中定义吧,就像linux中的全局变量定义在etc/profile中 对于文件的结构层次还不是很了解,请高手指点一下 [ 本帖最后由 ehyyngp 于 2008-1-30 09:44 编辑 ]
有这样一个需求,比如我的数据库中一些存储过程需要一些外界的配置变量(类似于程序的config文件),一个简单的办法就是创建一个config表,插入 需要配置的变量名和默认值,当存储过程运行时,查询这个表来取得相应的值,然后在进行判断决定流程的处理。一个最简单的例子:在存储过程中进行 log记录,我需要配置一下目前要记录的log的级别和类型。 问题时,这样在每次运行时都要去多查询一张表,是在太浪费资源,而很多这样的配置...
再一个内核模块中定义一个变量,比如是int count;希望别的模块可以访问这个变量,应该怎么做? 我在别的模块中extern int count;这样可以编译通过,但是kldload的时候可以出错。
方式一: file a.h: [code] extern var; void func_b(); [/code] file a.c: [code] int var; main() { var=11; func_b(); } [/code] file b.c: [code] #include "a.h" void func_b() { printf("%d",var); } [/code] 方式二: file a.h: [code] /*no extern here*/ void func_b(); [/code] file a.c: [code] int var; main() { var=11; func_b(); } [/code] file b.c: [code] #include "a.h" extern var; void func_b() { p...