×

Loading...

Topic

  • 工作学习 / IT技术讨论 / 再请教,有新情况:怎样用程序自动生成htm文件?就是说,如果用户不装web server,不上网, .asp 不能在IE中显示,但做好的有asp的文件怎样变成用户可以显示的文件?
    • 没人知道吗?我看到有一个地方有下载将asp转为htm文件的程序,可是我的asp文件会根据数据库的内容生成不同的htm文件. 有人知道怎么办吗?
    • If u mean server side, then web server must be installed, or else .htm can't be viewed either; if u mean client side, then no server is needed, since .asp is interpreted at server side
      • No.用户想要一个 独立的程序,就象一个.exe文件一样,可以在任何pc上运行,与web没有关系。能作到吗?非常感谢有人能回答我。我真发愁,用asp都做好了,结果又要求这样:-(
    • NightLight, bingle, antmm,hahaamy,日进斗斤,miketany,机械手,翻云覆雨,...... 各位大侠们,我急呀!请进:
      我再说详细一点:用户要求是全部写成htm文件,这样只要有IE就能浏览。以前的程序是有500个产品就做500个产品的htm,虽然每个htm只有几个数据不一样,查询功能用javascript做,产品目录放在一个txt文件中。

      现在用户想能够随时修改数据。实际上分两步,authority用户使用数据库,运行我做的程序,自动生成、修改和添加500个htm,放数据的txt文件等;这些htm 文件再给一般用户在IE上浏览。

      我感觉要用c++等编程语言做了,读数据库内容,程序自动生成htm文件。我知识水平有限,只知道这样,不知有没有简单的方法?

      可怜我没日没夜用asp+access做完了,又要从头开始。不过学了点东西还是值得的。

      c++等编程语言编程对我是没问题啦,可数据库不太熟悉,该用什么做?只要读数据库内容就可以了,修改等让用户用access做。

      我想用户这样的要求不是很特殊,有他的道理,因此这是一般的问题,说不定哪位大侠有经验。先谢谢了!
      • You can create ASP pages to allow companies to change their product data in database, then display these products to customers in ASP pages, too.
        • 谢谢!可是不装server,不上网,只用IE可以吗?我不是反问,我真的希望可以!
          • 可以,win98有一个personal web server,简称PWS的,就可以支持ASP。 这样,你就可以单机运行了。
            • 我知道,可客户希望htm放在光盘上,随便到哪里一打开就可以看了。IE比较普遍,用它没关系,装pwb他们就不愿意了。
          • 可以。你可以自己做一个web server。用VC作,很简单。你只要懂TCP/IP and Winsock or WinInet一切就应该OK. 你可以适市。
      • 可采用Powerbuilder,dephi等专门作数据库的开发工具,但你又要学一样语言了。我建议用powerbuilder,但界面会作的比较土。
        • authority客户要求不高,而且修改的次数非常少,可能几个月才修改一次,麻烦一点没关系。我的想法是:
          用access,或excel等输入,哪怕想办法转成txt文件,只要我的程序能读,我自己编写简单的查询函数。如果你说的数据库有在c中的接口就更好了,我直接调用。不用管它输入界面等。你说的powerbuider 可以吗?谢谢!
          • 原来你的用户只是需要一个从数据库转换成HTML文件的程序,我的理解对不对?如果你熟悉C++,就用C++好了。只是生成的不是TXT文件,需要你在程序中自动添加一些HTML的TAG。
            我说的PowerBuilder提供一个这样的功能函数。但你最好找一个做过Powerbuilder的人,应该是一个小时就能搞定的程序。
            • 谢谢!我想就是这个意思,我用c++生成html文件。你的意思是powerbuilder 可以自动生成htm文件吗?我希望不要用c++,看起来太低层了。
      • 关于你的问题,我没看明白,原谅我的理解速度只有几K,有点慢 :P
        你说“实际上分两步,authority用户使用数据库,运行我做的程序,自动生成、修改和添加500个htm,放数据的txt文件等;这些htm 文件再给一般用户在IE上浏览。”

        前面生成500个HTM文件等等,OK,我明白是怎么回事。”这些htm 文件再给一般用户在IE上浏览。“请问,这些HTM文件存放在哪里?一般用户怎么读到这些文件,是下载吗???

        你的要求是什么????
        • 谢谢有人关心我的问题了^_^ . asp 文件必须有server支持才能浏览,但用户希望比较通用的格式,如htm。用户用IE打开index.htm, 这个文件link到其他文件,这样用户就可以查询浏览了全部信息了。
          • 呵呵,反正我闲着也是闲着。我还是没明白,不太好意思。我想统一一下,首先,ASP程序是SRVER端的,经过SERVER解释.ASP程序之后才能生成HTML语言传递到客户端的IE上显示出来。
            你说:“用户用IE打开index.htm, 这个文件link到其他文件,这样用户就可以查询浏览了全部信息了。”

            当SERVER开着的时候,实现这个功能是完全没有问题的。

            其二,为什么要做成“有n个product就要有n个htm页.”呢?这不是浪费时间么???

            你的用户的要求是不是要单机使用的程序。本地输入,本地生成.htm文件??不知道access + VB可不可行。VB应该可以生成文本文件的吧~ 那也应该可以生成.htm文件吧?VB我不熟:(
            • come in...
              "当SERVER开着的时候,实现这个功能是完全没有问题的。" 希望不开的时候也能用。


              其二,为什么要做成“有n个product就要有n个htm页.”呢?这不是浪费时间么???

              可是有n个不同的htm页,如果不能用asp,还能怎样?

              好象 access +vb 可以。不过vb 也不熟 :-( 熟悉vc++. access+vc 可以用吗?
              • SERVER不开的时候就不能用ASP的方案啦。access+vc 应该也可以吧。VC稍微复杂一点,而且做这种小程序不是专长。你的意思是不是还是要有一个数据库的?然后从数据库中查询数据之类的?还有一个解决办法...
                不知道Access+ VB小程序(忘了缩写是什么)或者Excel + VB小程序行不行?以前有个同事做过,Access存储数据,里边有可以添加小程序的,可以完成一些查询功能。唉~ 真的忘了叫什么:( 老了:(
                • 大家都提到vb,看样子我也要学vb了.
                  • 总算记起来了,那个VB小程序叫VBA,VB Application,语法和VB一样,但是用法不太一样,Access中可以直接调用VBA,也可以对数据库操作。用这个做应该是最简单的了。Good luck!
              • 看来你并不熟悉VC,如果你真熟悉的话,VB简直就是一个小case. 两天高定。当年欧学VB 金泳3天。
    • hi, 有点问题,我不是很明白你要做的东东是什么???“但做好的有asp的文件怎样变成用户可以显示的文件?”是什么意思????
      • 我用asp做完了,用户不要用。用一个asp文件根据用户选择的product number显示相应的不同的htm页。不用asp, 那有n个product就要有n个htm页.有什么办法?
    • Confusing?
      I do not understand too.

      What you mean to "automatically transfer ASP file into HTML file"?
      or "use program to generate HTM file?"

      I am assuming you want to create a standlone program to collect data from database, however generate the output into htm file which can be viewed by a web browser.

      You can do it by Access 2000 which is a less expensive solution comparing with PB or VB.

      A suggestion, if you really rush to finish some work, you may like to make sure what you want first, and then decide which tool is best for you. This may save you lots of time.

      Hope that helps.
      • Thank you very much. "
        "I am assuming you want to create a standlone program to collect data from database, however generate the output into htm file which can be viewed by a web browser. " This is the point. I don't want to use c++.

        "You can do it by Access 2000 " Can access generate html files? How? I

        And thank you for your suggestion. I didn't regret anyway, because I learnt something.
        • 哎,我想起来了SQL server可以生成html文件,我以前试过一次,是用的SQL server 7.0,生成的页面比较的丑陋:P 能不能在程序自动生成就不太清楚了。你可以往这方面找找资料什么的。
          • 明天我去翻翻书,查一下.
        • 另:欣赏你这种明知山有虎,偏向虎山行的傻劲:) just do it! 就应该这样:)
          • 多谢夸奖!要感谢这么多帮助我的朋友!
      • DAP
        Data Access Page.
        Have a quick shot at the following links. Make sure you have required components before you deploy it in this way.
        http://msdn.microsoft.com/library/en-us/dnacc2k/html/programdap.asp
        http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/deploydap.asp


        Rather than C++, have you thought about java? But you may get your hand dirty with parsing and generating those raw html tags.

        If your major obstacle is software cost, you may like to consider Apache and PHP. They are all free both for NT and Unix and works similiar as IIS+ASP. Try to keep bugging the webmaster sailor here, he/she is the expert for this concern if you choose this way.

        Hope that helps.
        • You mentioned so many methods here :-) Thank you all for your warm hearts. I only have 4 days to finish it, so I hope there is an easy way to learn and to develop. ….
          Unfortunately, my knowledge is very narrow. I know a lot about C++ but know very little about others. After I finish this project, I may try all the ways you mentioned here.

          I am in China, so there is almost no problem about the cost.

          BTW, what do you mean by ‘keep bugging the webmaster sailor’?
          • ...
            so, you are in china right now. your problem seems to be too many choices left for you.

            If what you need is just collecting data and dynamically generating html file, I believe pb,vb or delphi, even vc has bulid in function library for this purpose. so pick up one and go ahead.

            you had mentioned there are around 500 html files? so you may like to
            consider to generalize and create some kind of template files rather than seperated html files. After all, 500 is not a small number.
          • crystal report
            本文发表在 rolia.net 枫下论坛Due to the time limit (they asked me to finish it on next Monday), I have to

            > it is surprised to know employer in china will set such kind of deadline.

            Some of the methods you(not only you yourself) mentioned are not suitable, because I am not seeking for a tool than can convert content of a database to html files one by one by the user. Html files must be generated automatically by the program, as the authority user may have no knowledge at all on database and those tools.

            > we understand what you want, and it does not make a sense
            > to 'convert content from database to html files one by one.'

            So I think I need a language that can create files and read records from a database, and the user just run it and needn't to do anything. The program should be able to create as many html files as the database needs(maybe far more than 500).

            > Do you have crystal report? If you do not need handling user data entry > at all, crystal report is really fast to generate well formatted data
            > (including html format) from database. but it has only limited ability to
            > collect data from user as the parameter to generate the report.

            I have little knowledge on database lib for c++ either :-( So I made a simple dbclass myself.

            > why? normally you just need use ADO object to deal with db.

            Good luck!更多精彩文章及讨论,请光临枫下论坛 rolia.net
            • Sorry, I don't have much time left :-( I will discuss it with you later.
    • To aboat: Change ASP to VB and create .exe file(s).
      • 能说详细一点吗?怎么change?谢谢!
        • You know VB right? ASP (VB Script) is one part of VB
          According to HTTP protocol, you get a "GET" or "POST" from IE Browser then produce and print out a HTML file to IE Browser.

          If there are just serveral ASP files, you can put them together to become a big exe file. Otherwise to read one ASP file , produce and print out one HTML file to IE Browser is a faster way. In this way, you actually create a simplified web server, like IIS, in fact.
          • Thank you. Come in….
            本文发表在 rolia.net 枫下论坛I browsed some books today and decided to use c++ at last.

            Due to the time limit (they asked me to finish it on next Monday), I have to choose one that I am familiar with and have full confidence in. I hoped there was a better way, but after scanning books on methods all of you mentioned, I think c++ is better than or at least as good as others.

            Some of the methods you(not only you yourself) mentioned are not suitable, because I am not seeking for a tool than can convert content of a database to html files one by one by the user. Html files must be generated automatically by the program, as the authority user may have no knowledge at all on database and those tools.

            So I think I need a language that can create files and read records from a database, and the user just run it and needn't to do anything. The program should be able to create as many html files as the database needs(maybe far more than 500).

            I have little knowledge on database lib for c++ either :-( So I made a simple dbclass myself.

            I bought many books today, and after I finish this project, I will read them and try some other ways.

            I thank all of you for your help once more.更多精彩文章及讨论,请光临枫下论坛 rolia.net
            • Sorry, this is to answer 麦当劳.
            • Good luck ! !
    • 我觉得可以用现在的asp+db放在一台固定的有web服务器的机器上面。然后呢,做一个页面把用户可能用到的所有连接都写上。然后通过类似telpro这样的离线浏览器下载该站点。就可以生成不以来于web server的独立的html文件了。如何??
      • 你完全理解我的目的。问题是,这些html不是我来生成,而是以后用户自己可以随时生成,让他们下载几百个页,可能不行。我没理解错吧?
        • 这样就没有办法了,只有用别的写了。
    • 请把你的Project描述得清楚一点,用什么数据库?ACCESS 还是 SQL SERVER? 用户的要求是什么?一张光盘到处能看,是什么意思?他们改不改数据?