I want to excute "pict" program which is a combination tool
and then pass all the output to the DB; mysql
and it seems either using exec, passthru or system doesn't matter, does't it?
what should be done step by step?
[PHP] executing pict and pass data to DB
Moderator: General Moderators
Re: [PHP] executing pict and pass data to DB
System won't give you the whole output
passtrough will output to the browser, so you need output buffering to get the data
exec can return array with every line of the output... if the output is text
shell_exec will return string with the whole output
And the last alternative is proc_open
So, what kind of data pict will return?
passtrough will output to the browser, so you need output buffering to get the data
exec can return array with every line of the output... if the output is text
shell_exec will return string with the whole output
And the last alternative is proc_open
So, what kind of data pict will return?
Re: [PHP] executing pict and pass data to DB
it returns this kind of table
below is a sample of the output(txt file)
Phone. MCO Accessory. VPS Bluetooth. VPC Bluetooth.
White. LBA-T950. off. off.
White. LBA-C300. on. off.
White. LBA-T950. on. off.
White. LBA-T950. off. on.
White. LBA-C300. off. off.
White. LBA-C300. on. on.
White. LBA-C300. off. on.
White. LBA-T950. on. on.
below is a sample of the output(txt file)
Phone. MCO Accessory. VPS Bluetooth. VPC Bluetooth.
White. LBA-T950. off. off.
White. LBA-C300. on. off.
White. LBA-T950. on. off.
White. LBA-T950. off. on.
White. LBA-C300. off. off.
White. LBA-C300. on. on.
White. LBA-C300. off. on.
White. LBA-T950. on. on.