
![]() |
Con
![]() Don't laugh too hard at me ![]() ![]() How do I pass a variable back to a program which I've run from command line? Example: This program is mainprogram. php<? php$cwd = getcwd(); $cmd = ' php'.$cwd.'/mainkey1.php';$cmdStatus = `$cmd`; echo($cmdStatus); ?> That runs program mainkey1. phpLet's say mainkey1. phpreads a file and outputs data into a variable called $main1How do I get that variable ($main1) which was run in mainkey1. phpBACK into this program (mainprogram.php ![]() I don't just want to do an include because I want to run this within a loop. I don't know what you guys would call this but essentially I want the ability to "CALL" another phpprogram from within one and take the output of that second program and do what I want with it in the first.Have I made ANY sense at all? ![]() Thanks for helping a newbie out. ![]() Con Con
Never mind...I got this to work with an include...I'm a dumbass!
![]() perkiset
NW Con... and the way that you'd do something similar is call program b from program a with shell_exec which would allow you to see the output from program b as a variable in program a. Confusing, I know, but consider:
Program A: #! /usr/local/bin/ php<? php$resultsFromB = shell_exec('./programB. php');echo "The results of program B are: $resultsFromB"; ?> Program B #! /usr/local/bin/ php<? phpecho 'Hello World!'; ?> If you chmod 755 program A and B, then run program A, you'd see: The results from program B are: Hello World This is REALLY the long way around - the include is obviously better, but this makes for an interesting exercise in any case. /p Con
Gracias Amigo...And hope you and yours had a Merry Christmas!
![]() Con perkiset
Still having it my friend, hope you are as well. Scoffing wifi from the resort next door to us in MX, so my connection is spotty but good when the air is right. Hope the new year brings you everything you are hoping for.
/p jammaster82
a buffalo wifi card with 6 foot cord to ma
gnetic antennae 7db boostwould be good for scoffage perkiset
Love to hear more about that... unfortunately parts are difficult to come by here in MX, but when I return home that sounds like an excellent thing to put together for my road kit. Design plan, parts and instrux thread please?
vsloathe
Buffalo is wonderful. Probably the best wifi card company for reference chipsets, and their hardware works on almost all
Linuxdistros (supported in 2.4.x kernel on I think).Buffalo card + cantenna is what I use when travelling. I can pick up wifi networks at approx. 1 mile away given decent terrain with few obstructions. As long as the wifinetwork is less than a mile away, I get solid reception as well.jammaster82
Here ya go dude, this guy will sell them both to you on ebay.... or
circuit city had one i picked up about two months ago... I wouldnt put the ma gneton my laptop like in the picture though lol....illsave the ma gnets for my perpetual motionmachine but here ya go:http://cgi.ebay.com/NEW-Buffalo-Turbo-Power-WLI-CB-G54HP-7dBi-OMNI-Antenna_W0QQitemZ200186852295QQihZ010QQcategoryZ40992QQtcZphotoQQcmdZViewItem Works wonders where i am signal less and pops on the car hood like old school cellie antennae coulda scoffed from linda carters dads building with this from 43rd and Glendale...hahaha perkiset
That looks sweet, although my Powerbook has the new expressport rather than the standard shape pcmcia... I'll look at the USB version and see if that can help me out. Thanks man
ratthing
If you don't want to make your own antenna, Hawking makes some nice ones for low cost as well.
=RT= |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads