What I want the browser to do is to run
exec('/bin/sh /var/www/html/make-vnc.sh $ip $port $hostname');
The make-vnc.sh creates a file with a .vnc extension. The end results is a file name that contains the hostname.vnc. Then on the Web page I output data from the database that contains the...
I have been having troubles trying to get exec to work on a Linux box. The code is as follows.
exec('/var/www/html/make-vnc.sh $ip $port $hostname');
When I use the above code, nothing happens. When I run the command on the command line, it works. Is there a switch that I have to turn...
$id is 10774
When I do the following it works
if ($lines != false){
$items = preg_grep('/10774/', $lines);
echo "<pre>".print_r($items, true);
}
But this does not.
if ($lines != false){
$items = preg_grep('/$id/', $lines);
echo "<pre>".print_r($items, true);
}
Not sure how...
The file is a php file. That was a typo. I have been doing some asp for awhile and now I am re-learning php. That is what my code is doing. It is getting the contents of file() and going through each line using preg_grep to find the line that contains a specific string. Right now it is...
I am having some difficulty getting a single line from a text file. I can do that using grep in UNIX but having problems in php. I tried preg_grep and getting nothing. Here is what I have so far.
the php file is called getText.asp and is called from another webpage sending the value to search...
Hi all,
I have read the readfile(), followed examples and I still get garbage when reading the PDF file. Here is what I have so far.
$filename = "doc6751.pdf";
header("Pragma: public");
header("Expires: 0");
header ("Cache-Control: must-revalidate, post-check=0, pre-check=0")...
I have a file with multiple lines and I want to parse it into an array to split the file at each carriage return. I am not sure how to do it. I have used split() in the past; however, I am not sure how to do this for a whole file with multiple lines.
TIA
Mike
I found an easier way. Don't know why it took me so long. Here is what I did since column1 is a datetime field and formated as 2/2/07, I just asked for all the data that the month is a 2 (Feb).
SELECT column1, column2
FROM table1
WHERE datepart(month,column1) = datepart(month, getdate())-1...
I am having troubled trying to figure out how to get the records of a table. As an example, I want to get all the records for the month of February if the current date is March 14, 2007. I am not too sure on how to use the datepart, dateadd, convert, getdate(). I have tried several ways, one...
I have a database containing thousands of records and I need to update a portion of a column. For Example, a column might have HSL41, HSL42, HSL5. etc. I want to be able to update the "HSL" to "HSM".
Is there a way to update all these records at one time without having to update these one...
This is perfect. I tested it and it will definitely save a lot of lines of code because normally, I will just have to check for value of one line and rewrite that one line.
Thanks,
Mike V.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.