|
Not knowing exactly what task or tasks you wish to batch perform, and not being a mind reader, may I suggest you visit web sites such as http://www.hotscripts.com/category/php/[^] and look to see if anything there (or elsewhere for that matters) jumps up and says "try me"!
modified 1-Aug-19 21:02pm.
|
|
|
|
|
The script is as shown below
<?php
session_start();
$userid=$_SESSION['userid'];
$res=exec('bat\diff_coursework.bat',$shell);
echo '<a href="content/differentiation_coursework/main.pdf"><input name="Download" type="button" value="Download" />';
include ("config.php");
$query="insert into access values('$userid','differentiation','coursework',NOW())";
mysql_query($query);
?>
It calls the batch file diff_coursework.bat and then display a download button for the main.pdf file.
I have several files to be run the same way therefore I need a general script for that instead of creating a new script for every file.
|
|
|
|
|
since this part is just a string being passed
'bat\diff_coursework.bat'
maybe an array might help
$bats_arr = array('diff_coursework.bat','diff_coursework2.bat','diff_coursework3.bat', etc....);
foreach($bats_arr as $bat_file)
{
$res=exec('bat\'.$bat_file,$shell);
}
|
|
|
|
|
Have you tried to implement this?
This will run all the bat files every time it is called.
I want it to be able select the bat files to run.
Thanks for the idea
|
|
|
|
|
Then in your code reference the array by the index via a link.
That will give you the selection you want and a single file to manage them all.
|
|
|
|
|
Hi guys i have this small class task that i'm having trouble with. I need to create a PHP file using SAX to generate the display shown below from an XML file.
*** This is the xml source code from which i need to generate the display: ***
<orders>
<order>
<count>37</count>
<price>49.99</price>
<book>
<isbn>0130897930</isbn>
<title>Core Web Programming Second Edition</title>
<authors>
<count>2</count>
<author>Marty Hall</author>
<author>Larry Brown</author>
</authors>
</book>
</order>
<order>
<count>1</count>
<price>9.95</price>
<yacht>
<manufacturer>Luxury Yachts, Inc.</manufacturer>
<model>M-1</model>
<standardFeatures oars="plastic" lifeVests="none">false</standardFeatures>
</yacht>
</order>
<order>
<count>3</count>
<price>22.22</price>
<book>
<isbn>B000059Z4H</isbn>
<title>Harry Potter and the Order of the Phoenix</title>
<authors>
<count>1</count>
<author>J.K. Rowling</author>
</authors>
</book>
</order>
*** what the expected output to look like below. ***
[IMG]http://img13.imageshack.us/img13/6950/75914446.jpg[/IMG]
|
|
|
|
|
Hi,
I try to execute a php code that stop when find a ">" char.
I new in web developing and i think that my feel experiencie is the real problem.
some one can help me ?
The messege i received on top of the page in preview is
setQuery("*", "people"); // If were called using ajax, only display the table, not the page body if > (EyeDataGrid::isAjaxUsed()) { $x->printTable(); exit; } ?>
The code i wish to execute is:
<?php
require 'class.eyemysqladap.inc.php';
require 'class.eyedatagrid.inc.php';
// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'codes');
// Load the datagrid class
$x = new EyeDataGrid($db);
// Set the query
$x->setQuery("*", "people");
// If were called using ajax, only display the table, not the page body
if (EyeDataGrid::isAjaxUsed())
{
$x->printTable();
exit;
}
?><HTML><HEAD><TITLE>EyeDataGrid Example 1</TITLE><LINK href="table.css" type=text/css rel=stylesheet><META content="MSHTML 6.00.6002.18130" name=GENERATOR></HEAD><BODY>
<H1>Basic Datagrid</H1>
<P>This is a basic example of the datagrid</P>
<?php$x->printTable();
?>
</BODY></HTML>
|
|
|
|
|
Can you please post the error message with error line number?
Also please check is there any whitespace before <?php , if there is any then try removing it.
http://www.halalit.net
|
|
|
|
|
just a basic look at the code it seams that you are missing a space in this part of the code.
<?php$x->printTable();
try
<?php $x->printTable();
|
|
|
|
|
I can't understand the question/problem, but the cjoki is right. You must format the code more clearly and carefully. There isn't white space betwen <?php$x->printTable(); ...
|
|
|
|
|
Whats the entry point in the linux kernel?
|
|
|
|
|
|
|
The only things that worries me: Why do you want to know???
That's why I gave short, albeit correct answer...
|
|
|
|
|
Just for my knowledge .
|
|
|
|
|
how to copy directory from one webstie to other using ftp? like :-
I am at http://ab.com
Now i want to copy directory b of http://abc.com/a/b to http://ab.com/data/
|
|
|
|
|
|
You cannot transfer a file from one ftp to another ftp
directly by any mean.
For that you need to download that particular file and then
upload it to another ftp address.
For downloading and uploading you need to connect to ftp server.
http://www.php.net/manual/en/ref.ftp.php[^]
Try ftp_get and ftp_put method for download and upload.
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks for your help but problem is solved.
|
|
|
|
|
Ok buddy...
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
It's not possible to give a complete answer to this question here. I would suggest you find a copy of the Linux source (it's open source so free) and read through the code. Alternatively I expect there are many books describing how Linux works, try a Google search for some possibilities.
It's time for a new signature.
|
|
|
|
|
|
Hi friends,
I've moved the apps into the Linux server under a driectory (/home/webdev/apps), which file i need to look to find out the current URL i should use to make the application work in browse?
Do I have to check any configure under /etc or something else? Please help, I am lost now..many thanks..
(to make the question simple, i have moved my application into a folder created under my username, i need to know the exact URL mapping to this folder, how can I achieve that info.?)
|
|
|
|
|
Create a directory called public_html in your home directory, then move the application directory inside public_html . Make sure all directories have "execute" permission for all users. The URL will be http://your.machinename.here/~webdev/apps
|
|
|
|
|