从目录填充选项列表并返回文件名 [英] Populate picklist from directory and return file name

查看:55
本文介绍了从目录填充选项列表并返回文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我一直在搜索一周而且无法找到和示例

填写目录中的选项列表并返回文件名字。


我有一个PHP脚本,可以读取日志文件并绘制图形。现在,

日志名称是硬编码的。日志以每天的形式存档,比如

ddmmyy.log,我想在脚本中放一个下拉列表,这将允许我的脚本运行
关闭日志选择或默认为当前的硬

编码名字。


我认为这将是一个非常普遍的事情,但我猜不是。


我会接受javascript或asp脚本只要我可以提供


文件名到我的php脚本。


任何人都可以指向我这样的脚本??


万分感谢!


Hi all,

I have been searching for a week and am unable to find and example to
"Populate picklist from directory and return file name".

I have a php script that reads a log file and plots a graph. Right now, the
log name is hard coded. The logs are archived each day in the form of say
ddmmyy.log and I would like to put a drop down list in the script that would
allow my script to run off the "log" picked or default to the current "hard
coded" name.

I thought this would be a really common thing but I guess not.

I would be open to a javascript or asp script as long as I could "feed"

the file name to my php script.

Can anyone point me to a script like this??

Thanks a million!


推荐答案

文章< ; rInVe.14457
In article <rInVe.14457


ct5.12705@fed1read04>,

" Mike Brashars" < MI ** @ apayrollservice.com>写道:
ct5.12705@fed1read04>,
"Mike Brashars" <mi**@apayrollservice.com> wrote:
大家好,

我一直在寻找一周,我无法找到和示例
填充目录中的选项列表并返回文件名。

我有一个PHP脚本,它读取日志文件并绘制图形。现在,
日志名称是硬编码的。这些日志每天都以ddmmyy.log的形式存档,我想在脚本中放一个下拉列表,它允许我的脚本运行log。选择或默认为当前的硬编码名字。

我认为这将是一个非常普遍的事情,但我猜不是。

我会接受javascript或asp脚本,只要我可以提供 ;

我的PHP脚本的文件名。

任何人都可以指向我这样的脚本吗?

万分感谢!
Hi all,

I have been searching for a week and am unable to find and example to
"Populate picklist from directory and return file name".

I have a php script that reads a log file and plots a graph. Right now, the
log name is hard coded. The logs are archived each day in the form of say
ddmmyy.log and I would like to put a drop down list in the script that would
allow my script to run off the "log" picked or default to the current "hard
coded" name.

I thought this would be a really common thing but I guess not.

I would be open to a javascript or asp script as long as I could "feed"

the file name to my php script.

Can anyone point me to a script like this??

Thanks a million!




< ;?

#Directory



<?
# Directory


dir =" / path / to / a / dir /" ;;


print"< select name =''file''>" ;;

while(false! ==(
dir = "/path/to/a/dir/";

print "<select name=''file''>";
while (false !== (


这篇关于从目录填充选项列表并返回文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆