04-04-2019
For completeness, pursuant to my post above, here is the PHP docs for
json_decode()
PHP: json_decode - Manual
There are two PHP functions very important to processing JSON objects:
json_encode() and
json_decode()
For example, you can do a mysql query on a DB and use
json_encode() on the mysql array returned from the query and echo the resulting JSON to create a simple REST API.
This User Gave Thanks to Neo For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I'm doing a script that reads lines from a file and then copy them to another file, if the user wants it.
But I'having problems to get the user selection because when I do the read to ask the user, the script reads the next line of the file.
The script looks like this:
#!/bin/sh
# ... (2 Replies)
Discussion started by: pmpx
2 Replies
2. Shell Programming and Scripting
Hi All,
If I don't want other user read my script, what can i do? :confused: (19 Replies)
Discussion started by: happyv
19 Replies
3. Shell Programming and Scripting
Hi Folks,
I have been trying to create a script wherein after it reads a certain number of data, it will pause and ask the user if he wants to continue or not. However, it seems that when it is supposed to read the user's answer, the script will go into a loop. What is wrong with my script here?... (7 Replies)
Discussion started by: rooseter
7 Replies
4. UNIX for Dummies Questions & Answers
Hi y'all...I've been wracking my brain over this very simple script that reads in a textfile and echos each line. But I keep getting an error.
Below is my script:
#!/bin/bash
while read myline
do
echo $myline
done < t_file-20080221.01.asc
The error I am getting is:
syntax error... (1 Reply)
Discussion started by: kevlar28
1 Replies
5. UNIX for Advanced & Expert Users
I have a script, except me no one can read the script but they can execute the script. Is it possible? (14 Replies)
Discussion started by: kingganesh04
14 Replies
6. Shell Programming and Scripting
Hi all.
I'm a newbie of bash scripting.
I need to create a script to have a rotate backup with 5 USB DISK on a work week.
With e2label, I've labelled all disk with all day of the week ( e.g. Monday, Tuesday, Thursday,... ).
How can I read if I've plugged the right device ?!?!
I find... (3 Replies)
Discussion started by: filloweb
3 Replies
7. Shell Programming and Scripting
# cat /tmp/checkdate.log
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 17 22:49:00 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
FIRST_TIME NEXT_TIME... (1 Reply)
Discussion started by: SarwalR
1 Replies
8. UNIX for Advanced & Expert Users
Hi All,
Please let me know how to read space between 2 words in script. It is reading only first chars ES,NZ. But after space it is not reading next 3 chars.
ES LPI
NZ GBL
FR LPI
DK LPI
for v_sob_cntry_cd in `cat /shared/set_of_books_cntry_cd_list.lst`
do
... (6 Replies)
Discussion started by: kiranparsha
6 Replies
9. Shell Programming and Scripting
.... Solved....
..
..
Hello,
I've read couples of similar threads to my question and I strongly believe that I am doing something wrong. What I'm trying to do is to process data with php. It reads data from shell script.
Everything goes well but at the end it does not print what it reads... (0 Replies)
Discussion started by: baris35
0 Replies
10. Shell Programming and Scripting
Hello,
I am running under ubuntu14.04 with php5. When I run below php, it creates a token, then adds axaxax and bxbxbx into pc database, and at last, kills created token.
What I am trying to do is to add userid and password read from a file. I do not wish to enter username and password manually.... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT LINUX
php-config5
php-config(1) Scripting Language php-config(1)
NAME
php-config - get information about PHP configuration and compile options
SYNOPSIS
php-config [options]
DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration.
OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local
--includes List of -I options with all include files
--ldflags LD Flags which PHP was compiled with
--libs Extra libraries which PHP was compiled with
--extension-dir
Directory where extensions are searched by default
--include-dir Directory prefix where header files are installed by default
--php-binary Full path to php CLI or CGI binary
--php-sapis Show all SAPI modules available
--configure-options
Configure options to recreate configuration of current PHP installation
--version PHP version
--vernum PHP version as integer
SEE ALSO
php(1)
VERSION INFORMATION
This manpage describes php, version 5.3.6-13ubuntu3.10.
COPYRIGHT
Copyright (C) 1997-2010 The PHP Group
This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available
through the world-wide-web at the following url:
http://www.php.net/license/3_01.txt
If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to
license@php.net so we can mail you a copy immediately.
The PHP Group 2010 php-config(1)