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
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题