1 / 7

PHP によるCプログラムの実行

PHP によるCプログラムの実行. システムコールの復習. // コマンドの内容を変数に代入 $command=“ls /home/fushimi/file/data/”; // 出力結果を格納用の配列の初期化 $output= array() ; // 戻り値を格納する変数の初期化 $return=null; // コマンドの実行関数 exec( $command,$output,$return ) ;. Cプログラムを実行させる. // コマンドの内容を変数に代入 $command=“./cpgm 引数 1 引数 2”;

yuri
Download Presentation

PHP によるCプログラムの実行

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PHPによるCプログラムの実行

  2. システムコールの復習 //コマンドの内容を変数に代入 $command=“ls /home/fushimi/file/data/”; //出力結果を格納用の配列の初期化 $output=array(); //戻り値を格納する変数の初期化 $return=null; //コマンドの実行関数 exec($command,$output,$return);

  3. Cプログラムを実行させる //コマンドの内容を変数に代入 $command=“./cpgm 引数1 引数2”; //出力結果を格納用の配列の初期化 $output=array(); //戻り値を格納する変数の初期化 $return=null; //コマンドの実行関数 exec($command,$output,$return);

  4. 実行させるプログラムを選択 $a=$_POST[‘cpgm’]; if($a==prk)$command=“〇〇”; else if($a==hits)$command=“〇〇”; else if($a==deg)$command=“〇〇”; else if($a==clc1)$command=“〇〇”; else if($a==clc2)$command=“〇〇”; else if($a==bwc)$command=“〇〇”;

  5. ランキングプログラム(C)の詳細 • ページランク • ./prkalpha label-list 出力ファイル名 • Hits • ./hits label-list 出力ファイル名 • 次数中心性 • ./deg label-list 出力ファイル名 • 近接中心性 • ./clc1 label-list 出力ファイル名 • ./clc2 label-list 出力ファイル名 • 媒介中心性 • ./bwc label-list 出力ファイル名

  6. ランキング結果のソート(並び替え) • ./csortNURLIDランキング結果ファイル名出力ファイル名 • 0 1 2 3 4 • 0:プログラムの実行ファイル名 • 1:並び替える値の総数(例:12047)label-listの第1行目に書いてある • 2:URLID • 3:ランキングの結果ファイル(例:prk.txt) • 4:並び替え結果のファイル(例:sprk.txt)

  7. 補足 • 読み込むlabel-listは“:1”のついてないもの • 近接中心性 clc1とclc2の違い

More Related