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...
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 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...
I am having problems trying to read from a file and then writing to the file. I have a file that initially has nothing. When the form loads for the first time, I want to create the file and add some text to it, for example,
25
SC1=
SC2=
SC3=
SC4=
SC5=
Then close the file.
SC1 through SC5...
I keep getting the error "Syntax error converting the varchar value 'division_muster' to a column of data type int. The table consist of many different types of permissions and I am passing a varchar variable @strPerms which contains the name of a field. When I run the following code I get the...
I am having a problem trying to escape a "'" character when calling an onClick event. Here is the on click event code.
strName = oRS.Fields("MEMBER")
response.write "onClick=" & chr(34) & "OpenInfo('" & .Fields("pid") & "','" & strWorkCenter& "','" & strDivision & "','" & FixApost(strName)...
I just upgraded to Office 2003 on the client machine and when I try to submit a form that opens a work document, I get an error, "Error: ActiveX component can't create object: 'Word.Application'. Has something changed in Office 2003? My code that used to work is as follows:
Dim oWA
Dim oWD...
I have three tables, personnel, qualification, qualifications.
The personnel table list fname,lname and other information about the person
The qualification table list all the different qualifications/training, i.e. Annual Safty Training, Divisional Coordinator, Tow Tractor, etc.
The...
I get an error when the folder name has an apostrophe. Here is part of my code.
Dim sFolder
dim sFolderRoot
sFolderRoot = oSheet.Cells(2, 1).Value 'Value is "Z:\AMA's"
Set sFolder = oFso.getfolder(sFolderRoot & "\")
I get a "Path not found error." I have tried,
Set sFolder =...
I am getting a "path not found" error when the folder name consist of two words such as c:\word1 word2\. I have tried,
strFolder = c:\word1 word2
Set sFolder = oFso.getfolder(chr(34) & strFolder & chr(34))
I have noticed that some people in the organization have made folder names using two...
Having problems with the following script. When the variable fName is a path such as, c:\Folder\subFolder, p:\folder\subfolder, the script works. When the variable fName is a path such as \\domainFileServer\folder\Subfolder, I get an automation error. Any suggestions
Function...
I downloaded the sample code in thread222-760425; however, when I try to use Trim$(hostname), nothing happens, the variable still contain vbNullChar characters. How do I remove vbNullChar characters in a string. Here is sample code.
Private Declare Function gethostname Lib "WSOCK32.DLL"...
I have been having difficulties adding a user to a security group. Here is a sample script:
' Author Guy Thomas http://computerperformance.co.uk/
'
Option Explicit
Dim objRootLDAP, objGroup, objUser, objOU, objMemberOf
Dim strOU, strUser, strDNSDomain, strLDAP, strList
Dim intCounter...
I am having difficulty in the following subquery. I keep getting the syntax error at 'SELECT count(*)'.
SELECT ID, organization, (SELECT count(*) FROM Invoices WHERE paid = 'N') AS paid
FROM clients
What I am trying to do is to get a list of clients and also count any unpaid invoices.
Does...
I am having some problems in figuring out how to transverse multiple select tags that contain multiple option tags.
For example
<form name=form action="" method=post>
<select name=selName onChange="clrSelect(selName)">
<option value=1>1</option>
<option value=2>2</option>...
I have a file that I have downloaded using a perl script and the file is in .gz format. The command I am using to gunzip the file is
system("gunzip -f" . $localfile); # file name is $file.log.gz
substr($localfile, -3) = ""; #remove the ".gz" from $localfile name
Sometimes this works and...
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.