English 中文(简体)
B. 规划个人用品的最佳做法
原标题:Best practices in scheduling PHP scripts

For a project I need to schedule several PHP scripts. Some of the scripts are a bit complicated (ie. send mail, do database stuff, use several external webservices, use external files and classes etc). The problem is that these scripts also need to be called from the browser, and they do use some of the variables in the $_SERVER array (including HTTP_HOST).
Is there a way to make these kind of scripts work from the commandline, or do I have to rewrite them to be commandline-compatible ? Or is it better to use parameters from the commandline that specify the variables that are not available?

我们拥有一个服务器,运行2008年Windows服务器。

最佳回答

你们应当把浏览器和指挥线环境所共有的部分文字推论出来。 然后,你可以把这两份文字列入,其中一份将使用_SERVER,另一张指挥线论点变量来管理共同部分。

问题回答

规划购买力平价文字的最佳做法?

(1) 无。 这是一种滑坡——你最终投入了太多的时间,试图将文字整理整理到现有的时间档中,最后,你实行一种制度,根据哪一种工作是经营的,哪一种是固定的。 确实,你想要直接根据用户要求启动所有处理。 (这并不意味着他们必须工作 synchronously,并且与用户要求相同。)

(2) 微软的操作系统不是提供全球数据系统,而是没有其他运行系统可用的工作管理和自动化工具的范围

我看到了许多案例,人们仅仅因为其法典的表现而把他们拖到预定的战区。 在许多情况下,更好的解决办法是解决业绩问题。

说到,既然你已经充耳不闻,你可以把你的所有代码重复到指挥线和网络版上——或者你可以下载wget,并安排这些方案使用你的URL,通过全球空间局或地理空间局使用所要求的数值。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签