Intro
Apache 安裝 PHP 的方式
基於Windows 7
雖然網路上找到很多人在說
但還是做個筆記
。 解壓&設定 PHP
。 安裝&設定 Apache
。 建立 Apache 的 Windows服務
。 PHP測試程式
。 安裝MySQL & 測試程式
#include "stdafx.h" #include <string> #include <map> using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
map<string, int> maps;
Insert
map<string,int>::iterator it = maps.begin();
maps.insert(it, pair<string,int>("A",26));
maps.insert(it, pair<string,int>("B",27));
maps.insert(it, pair<string,int>("C",28));
maps.insert(it, pair<string,int>("D",29));
maps["E"] = 30;
For Loop
for (it=maps.begin(); it != maps.end(); ++it){
printf("%s = %i\n", it->first.c_str(), it->second);
}
Get
printf("E = %i\n", maps["E"]);
printf("F = %i\n", maps["F"]);//預設為0
Remove
maps.erase("E");
Find
it = maps.find("E");
if(it == maps.end())
printf("not found.\n");
else
printf("%s = %i\n", it->first.c_str(), it->second);
The end...
getchar();
return 0;
}
#define GetObjName(x) #x
#define DebugPrint(msg) printf("%s ; %s ; %s ; %d\n", #msg, __FILE__, __FUNCTION__, __LINE__)
#define Contact(x, y) x##y
int _tmain(int argc, _TCHAR* argv[])
{
printf("line: %d \n", __LINE__);
printf("file: %s \n", __FILE__);
printf("function: %s \n", __FUNCTION__);
//printf("function: %s \n", __func__);
printf("time: %s \n", __TIME__);
printf("date: %s \n", __DATE__);
//printf("STDC: %d \n", __STDC__);
//printf("STDC_HOSTED: %d \n", __STDC_HOSTED__);
//printf("VERSION: %s \n", __VERSION__);
printf("TIMESTAMP: %s \n", __TIMESTAMP__);
char* s = GetObjName(MyClass);
printf("%s \n", s);
Contact(pri, ntf) ("exec printf \n");
DebugPrint("Debug");
getchar();
return 0;
}
Macro中的# 代表取得variable名稱