dongzhang5006 2013-05-29 18:27
浏览 187
已采纳

保存并打开日志文件

I have a vb.net app that webrequests a PHP file which does this:

<?php
$msg = $_GET['w'];
$logfile= 'savedrv.idps';
$fp = fopen($logfile, "w");
fwrite($fp, $msg);
fclose($fp);
?>

I want to make a PHP file that will open the new file created "savedrv.idps" so I can read it in vb.net. This is what I tried:

<?php
$logfile= 'reg.idps';
$fp = fopen($logfile, "r");
fclose($fp);
?>

How can I accomplish this?

  • 写回答

1条回答 默认 最新

  • duan88014 2013-05-29 22:10
    关注

    Most likely your IIS settings for this Virtual Directory forbid a file with this extension to be browsed to. I got 404.7 error attempting to open a file in IE when I browsed to the URL: http://localhost/mysite/myvbfile.vb Using your browser, try to open the same URL that your VB program is attempting to access. I anticipate that you will get the 404.7 error in the browser window too.

    You have two approaches here:

    1. Have your PHP script write the file to a location outside of IIS where your VB.Net program can access.
    2. Modify the Request Filtering in IIS for your site so that this file can be browsed. (screenshot) http://support.citrix.com/article/html/images/1CTX132655-1.gif
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler