diff --git "a/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" "b/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" index b9c58fdcbe48546f61280de9f47f0f42742877c4..3f7a8e9e91c14466f1e0f25b837bc3ca1899ded9 100644 --- "a/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" +++ "b/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" @@ -20,4 +20,21 @@ static PHP_METHOD(study_coroutine, test); 4、只在项目根目录下的`study_*.cc`文件里面使用`Zend API`,不在`src`目录的代码里面使用`Zend API`。 -(待补充) \ No newline at end of file +5、用到的标准库函数都在`include/study.h`里面引入。 + +6、为了防止重复引入头文件,增加如下条件编译。例如,在`study.h`头文件里面写入: + +```c++ +#ifndef STUDY_H_ +#define STUDY_H_ + + +#endif /* STUDY_H_ */ +``` + +注意宏的命名规范。 + +7、只在`php_study.h`头文件里面引入`PHP`相关的头文件。`study_*.cc`只引入`php_study.h`文件,不去引入`include/study.h`文件。`study.h`文件是被`php_study.h`引入的。 + +(待补充) +