Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: mevasquez
  • Order by date
  1. mevasquez

    Exec() question

    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...
  2. mevasquez

    Exec() question

    Did not work. I can run the file from the command line with success but I cannot not run the file successfully from the Web page. Mike
  3. mevasquez

    Exec() question

    Safe_mode is turned off. Mike
  4. mevasquez

    Exec() question

    The make-vnc.sh file permission is 755 apache.apache. Mike
  5. mevasquez

    Exec() question

    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...
  6. mevasquez

    Output Single File in Text File

    Never mind, I figured it out using implode. Thanks for your help. Mike
  7. mevasquez

    Output Single File in Text File

    Ok that works; however, it is outputted out $item[69]. Is there a function to get the element number of the output. Mike
  8. mevasquez

    Output Single File in Text File

    $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...
  9. mevasquez

    Output Single File in Text File

    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...
  10. mevasquez

    Output Single File in Text File

    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...
  11. mevasquez

    Reading a PDF File I get garbage

    I will try and upgrade php and get back to this question. Thanks to all, Mike
  12. mevasquez

    Reading a PDF File I get garbage

    Still no luck. If I just wanted to create a link and have the user download or open file, how is that done? Mike
  13. mevasquez

    Reading a PDF File I get garbage

    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")...
  14. mevasquez

    split a file at the carriage return

    Thanks, that worked. I have been out of php for about four years. Now I feel like I am re-learning it. There have been some slight changes. Mike
  15. mevasquez

    split a file at the carriage return

    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
  16. mevasquez

    Getting last month records

    Great that worked. Thanks,
  17. mevasquez

    Getting last month records

    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...
  18. mevasquez

    Getting last month records

    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...
  19. mevasquez

    Updating multiple records

    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...
  20. mevasquez

    writing and reading to text file

    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.

Part and Inventory Search

Back
Top