运行环境ubuntu10.04,php+mysql+apache,
问题简述:shell调用nikto并生成一个txt文件,php调用shell,ubuntu调用php,
txt文件没有生成,为什么?我在 php 页面中调用shell脚本:
php:
<?
echo "test";
system("/home/test/下载/nikto-2.1.3/hello.sh ");
?>
shell 脚本
#!/bin/bash
#hello world
#a function
function hello()
{
echo "url:www.fjnu.edu.cn"
perl nikto.pl -h "www.fjnu.edu.cn" -o test.txt
}
echo "begin"
hello
echo "end"浏览器访问php页面,页面显示
begin url:www.fjnu.edu.cn end 但没有生成 test.txt页面,哪里出问题了?
谢谢~
问题简述:shell调用nikto并生成一个txt文件,php调用shell,ubuntu调用php,
txt文件没有生成,为什么?我在 php 页面中调用shell脚本:
php:
<?
echo "test";
system("/home/test/下载/nikto-2.1.3/hello.sh ");
?>
shell 脚本
#!/bin/bash
#hello world
#a function
function hello()
{
echo "url:www.fjnu.edu.cn"
perl nikto.pl -h "www.fjnu.edu.cn" -o test.txt
}
echo "begin"
hello
echo "end"浏览器访问php页面,页面显示
begin url:www.fjnu.edu.cn end 但没有生成 test.txt页面,哪里出问题了?
谢谢~
解决方案 »
- 〖Orz〗求1条sql语句
- Login 的问题
- 关于服务器IIS的域名设置问题
- 有懂htaccess的人么 进来看看 子域名简单问题
- ecshop怎么实现在线实时手机缴费功能?需要什么接口,或者怎么开发?有成功示例吗,向大神求助
- 如何将图片上传到数据库,或者上传图片路径到数据库。不够再加分。在线等!
- Apache和PHP配置出错
- 贴子不能刷新了,gz不能说了,参与分没了,我也快要退出CSDN了……极度不理解中(ipman)
- tp json返回数据前面有<!DOCTYPE html>
- 菜鸟升级PHP study mysql 5.7 历险记。。。
- 怎么把一个php类文件里面的代码全部读出来?
- mysql phpmyadmin问题
你确定这句是生成文件的?
#hello world
#a function
function hello()
{
curl --head www.fjnu.edu.cn -o text.txt
}
hello这样即可,当然你要装了curl
谢谢你的回答,
但我希望nikto生成test.txt页面,而不是curl。