How to open the webpage?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to open the webpage?

ソリューションへジャンプ
2,771件の閲覧回数
winmaxi
Contributor I

Hi, I'm currently reading the code of LAB 4.

 

How does the code link to the webpage it opens?

 

In the code there is <server = httpd_server_init((HTTPD_ROOT_DIR_STRUCT*)root_dir, "\\mqx.html");>   I can't locate mqx.html.

 

Also, could you please tell me how does it go to the root directory of the webpage without spelling out the webpage's address?

 

Thank you.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,801件の閲覧回数
M_ttferrari
Contributor III

HI, 

 

Are you installed the tfs? 

 

You need convert your web pages to tfs with mktfs.exe (it is located in somewhere at mqx folder, I don't remember now). This application converts your web pages into a c file (tfs_data.c) then you need to declare a HTTP_ROOT_DIR_STRUCT 

 

const HTTP_ROOT_DIR_STRUCT root_dir[] = {

 { "", "tfs:"},

 { 0, 0}

};

 

then before to install your server, install the tfs where the server will find your web pages (and images if you web page has ones).

 

io_tfs_anstall("tfs", tfs_data);

 

Please, take a sight to MQX RTCS user guide you will find some examples about how initialize a web server.

 

Matt

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,801件の閲覧回数
winmaxi
Contributor I

Now I know where the mqx.html locate. But I still don't know how the program indicate where the folder is without spelling out the directory.

 

Could anyone answer my question?

 

Thank you

0 件の賞賛
返信
1,802件の閲覧回数
M_ttferrari
Contributor III

HI, 

 

Are you installed the tfs? 

 

You need convert your web pages to tfs with mktfs.exe (it is located in somewhere at mqx folder, I don't remember now). This application converts your web pages into a c file (tfs_data.c) then you need to declare a HTTP_ROOT_DIR_STRUCT 

 

const HTTP_ROOT_DIR_STRUCT root_dir[] = {

 { "", "tfs:"},

 { 0, 0}

};

 

then before to install your server, install the tfs where the server will find your web pages (and images if you web page has ones).

 

io_tfs_anstall("tfs", tfs_data);

 

Please, take a sight to MQX RTCS user guide you will find some examples about how initialize a web server.

 

Matt

0 件の賞賛
返信
1,801件の閲覧回数
winmaxi
Contributor I

Thank you very much.

 

I have question about using mktfs.exe.

When I double click it directly, it will close in about 2 seconds.

When I run it using windows command prompt, what the format is like?

In using MQXlibraries document, 

it asks us to input like the following:

 

mktfs.exe <Folder to be converted> <Output source file name>

for example:

C:\mktfs.exe web_pages tfs_data_file.c

 

I put mktfs.exe C:.../webpages(the directory of the webpage folder) tfs_data_file.c

it asks me to input [-s <separate file>] <input_directory>

I don't know what it means, so I input as the folliowing:

 

mktfs.exe C:.../webpages(the directory of the webpage folder) C:..../tfs_data_file.c(where I want to save the translated C document)

it shows the same message.

 

What exactly the format should be like? Could anyone help me?

0 件の賞賛
返信