473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

php without a server

I'm just need to excec a few php scripts that mainly do admin job over
files, like create folders, rename files, backup them, ....

Is there any way to run the scripts as if they were a sort of ".bat"
files?

regards - jm

Jan 12 '06 #1
3 1181
On Thu, 12 Jan 2006 00:41:27 -0800, julian_m wrote:
I'm just need to excec a few php scripts that mainly do admin job over
files, like create folders, rename files, backup them, ....

Is there any way to run the scripts as if they were a sort of ".bat"
files?

regards - jm


Yes. There is a command line version ( well certainly for *nix, probably
for windows ) which will allow you to do just that.

I've taken to writing my 3 liners in php and moved away from other
scripting languages, as there's one less language to remember. And some of
them get really annoying when things like the use of a $ change between
languages!

My $0.02,

Steve

Jan 12 '06 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

julian_m wrote:
Is there any way to run the scripts as if they were a sort of ".bat"
files?


RTFM:

http://www.php.net/manual/en/features.commandline.php
- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.12-1-686 kernel, KDE3.5.0, and PHP
5.1.1-1 generating this signature.
Uptime: 10:13:19 up 14:43, 1 user, load average: 0.88, 0.41, 0.27

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDxh3D3jcQ2mg3Pc8RApndAJ9lkdQxyGmc5D/7fF5Xv2hcbH00fwCdHPtd
cIGGs6/D0XjQdYPoMFBu2Kw=
=voq3
-----END PGP SIGNATURE-----
Jan 12 '06 #3
d
"julian_m" <ju***********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I'm just need to excec a few php scripts that mainly do admin job over
files, like create folders, rename files, backup them, ....

Is there any way to run the scripts as if they were a sort of ".bat"
files?

regards - jm


If you're on windows, make a small batch file that takes a script as an
argument, and passes it to your PHP executable (also pointing out to it
where your php.ini is, if needed). Then, in Windows, associate an extension
(I do .xphp) with that batch file. Now, when you run a .xphp file (from the
gui or command line) it acts exactly like a batch file, but is executing
PHP. I use this all the time, and it works really well.
Jan 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Pascal Cloup | last post by:
Hello, I just want to send an e-mail from my windows form application without specifying SmtpServer. On my computer, when i specify my smtpserver, SmtpMail.Send( aMail ) works fine, but...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
38
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
5
by: Jonathan Kay | last post by:
Hi, I'd like to my WCF webservice to work both on SSL and without. Unfortunately searching has led to dead ends, references to changes that only work on the old previous beta versions and I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.