|
ilişkilendirebilir veya betiği PHP üzerinden çalıştıracak bir yığın dosyası yapabilirsiniz. Unix'de çalışması için betiğe eklenen ilk satır Windows'da sorun çıkarmaz, böylece platformdan bağımsız programlar yazabilirsiniz. Örnek basit bir komut satırı PHP programı aşağıdaki gibi olabilir.
|
|
(or "shebang") first line should be added to PHP scripts so that the system can automatically tell which program should run the script. On Windows platforms, it's possible to associate
|
|
L'exécutable PHP peut être utilisé pour exécuter des scripts indépendants du serveur web. Si vous êtes sur un système Unix, il est recommandé d'ajouter la ligne spéciale en début de script, de le rendre exécutable de manière à ce que le système sache quel programme doit exécuter le script. Sous Windows, vous pouvez associer l'exécutable
|
|
("shebang") erste Zeile zu PHP-Skripten hinzugefügt werden, damit das System automatisch herausfinden kann, welches Programm zur Ausführung der Datei genutzt werden soll. Auf einem Windows-System können Sie
|
|
(o conocido como "shebang") deben añadirse en la primera línea del script seguido de la ruta hacia el binario de PHP para que le indique autom[aticamente al sistema cual es el programa que debería ejecutar al script. En plataformas Windows puede asociar
|
|
を関連づけることができます。 または、PHP によりスクリプトを実行するバッチファイルを作成することも 可能です。Unix 上で動作させるためにスクリプトに追加された先頭行は、 Windows 環境での動作に悪影響を与えません。このため、この手法により、 クロスプラットフォーム環境で動作するプログラムを書くことができます。 コマンドライン PHP プログラムの書方の簡単な例を以下に示します。
|