我有以下shell脚本-
#!/bin/bash
echo "enter the full path of script";
read path;
while true
ps aux | grep -v grep | grep -q $path || ( nohup php -f $path & )
done
我用下面的方式执行-
bash test.sh
enter the full path of script
php_test.php
test.sh: line 7: syntax error near unexpected token `done'
我尝试更改valet使用的PHP版本,因此我执行以下命令:
valet use php@7.4
Valet返回成功消息:Valet is now using php@7.4.
但是如果我在.test网站上使用phpinfo(),我看到php是7.3。
我已经用这种方式多次更改了php版本,它总是有效的。我不明白现在是怎么回事。
我用Artisan创建了一个命令
$ php artisan command:make NeighborhoodCommand
这创建了文件app/commands/NeighborhoodCommand.php
代码片段。我修改了name值并填充了fire()函数
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class NeighborhoodComma
用Ajax.Request (使用prototype)调用PHP文件中的某个方法的最佳方式是什么?我用Form.serialize提交了一个表单,所以我想添加一个参数(比如要调用的方法的名称),然后在服务器脚本上检查它。类似于:
var params=Form.serialize("someform")+"&=method='check_data'";
new Ajax.Request('somescript.php',{method:'post',parameters:params,onSuccess:
我试着用laravel 8运行这个命令。*但它不起作用。
php artisan make:auth
我犯了个错误
Command "make:auth" is not defined
Did you mean one of these?
make:test
make:request
make:migration
make:seeder
make:middleware
make:controller
make:provider
make:policy
mak
我试着运行命令:
php artisan generate:seed Houses
但是,我得到了一个错误:
failed to open stream: No such file or directory generate:seed [--path="..."] [--templatePath="..."] tableName
我迁移了我的表,用php artisan generate生成了我的控制器和表。我用的是拉拉维尔4.2。有什么东西不见了吗?我试图遵循教程的说明,有些手工命令不起作用。就像我试图生成迁移文件一样,它给了我同样的错误,但是我注意到在生成控