Changeset 63 for branches/testa-single-bookmark
- Timestamp:
- Aug 31, 2019 10:20:18 PM (6 years ago)
- Location:
- branches/testa-single-bookmark
- Files:
-
- 1 deleted
- 2 edited
-
php/content3.php (modified) (8 diffs)
-
php/x.php (deleted)
-
settings-devconf.yml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/testa-single-bookmark/php/content3.php
r60 r63 86 86 $cmd_line = implode(" " , $cmd_line_items); 87 87 88 $array = array(); 89 $handle = popen( $cmd_line , "r"); 90 while (( $buffer = fgets($handle, 4096)) !== false){ 91 $line = trim($buffer); 92 $data = explode($top_path, $line)[1]; 93 array_push($array , $data); 94 } 95 if (!feof($handle)) { 96 echo "Error: unexpected fgets() fail\n"; 97 } 98 pclose($handle); 88 exec($cmd_line, $results, $ret_code); 99 89 100 return array( "top_path" => $top_path, "file_list" => $array); 90 if( $ret_code === 0 ){ 91 $array = array(); 92 foreach($results as $buffer){ 93 $line = trim($buffer); 94 $data = explode($top_path, $line)[1]; 95 array_push($array , $data); 96 } 97 $array_x = array( "top_path" => $top_path, "file_list" => $array); 98 } 99 else{ 100 $array_x = array( ); 101 } 102 return $array_x; 101 103 } 102 104 … … 138 140 mkdir($dir); 139 141 $path = implode( "/" , array( $dir , $filename) ); 140 # echo "path=$path";141 142 ensure_dir( $dir ); 142 143 … … 159 160 $list = get_site_tsv( $num ); 160 161 161 debug_vd( $list );162 163 162 $t = $list[$base]["t"]; 164 163 $s = $list[$base]["s"]; … … 174 173 $cmd_line = implode(" " , $cmd_line_items); 175 174 176 $array = array(); 177 $handle = popen( $cmd_line , "r"); 178 179 while (( $buffer = fgets($handle, 4096)) !== false){ 180 $line = trim($buffer); 181 array_push($array , $line); 182 } 183 if (!feof($handle)) { 184 echo "Error: unexpected fgets() fail\n"; 185 } 186 pclose($handle); 187 188 $full_download_url = implode( "/" , array( $output_url , $output_html ) ); 189 190 $html_fname_tmp = $output_html . ".tmp"; 191 $partial_download_url = implode( "/" , array( $output_url , $html_fname_tmp) ); 192 193 $info = array( "full_download_url" => $full_download_url, 175 176 exec($cmd_line, $results, $ret_code); 177 if( $ret_code === 0 ){ 178 $full_download_url = implode( "/" , array( $output_url , $output_html ) ); 179 180 $html_fname_tmp = $output_html . ".tmp"; 181 $partial_download_url = implode( "/" , array( $output_url , $html_fname_tmp) ); 182 183 $info = array( "full_download_url" => $full_download_url, 194 184 "partial_download_url" => $partial_download_url ); 195 185 } 186 else{ 187 $info = array(); 188 } 196 189 return $info; 197 190 } … … 269 262 } 270 263 else{ 271 output_file( dirname(__FILE__) . "/debug-F.txt" , "ABCDEFG" );264 # output_file( dirname(__FILE__) . "/debug-F.txt" , "ABCDEFG" ); 272 265 $ret = "P-UPLOAD_CONTENT-NO-PATH"; 273 266 } … … 290 283 291 284 default: 292 debug_x("P-DEFAULT");285 # debug_x("P-DEFAULT"); 293 286 /* $content = "P-DEFAULT";*/ 294 287 break; … … 302 295 } 303 296 else{ 304 debug_x('DEFAULT');297 # debug_x('DEFAULT'); 305 298 } 306 299 … … 428 421 } 429 422 423 function do_exec(){ 424 $cmd = "ls -l /z"; 425 426 exec($cmd, $opt, $ret); 427 428 # print_r($opt); 429 # echo "ret=" . $ret . "\n"; 430 } 431 430 432 cmdx(); 433 /* 434 do_exec(); 435 */ 431 436 /* 432 437 $num = 0; -
branches/testa-single-bookmark/settings-devconf.yml
r55 r63 1 1 - 2 2 url: https://toppers.jp 3 path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/ c/md2site/_xtest/wtjx/t12/src4 conf_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/ c/md2site/_xtest/wtjx/t12/conf5 output_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/ c/md2site/_xtest/wtjx/t12/output6 bundle_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/ c/md2site3 path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/a/c/md2site/_xtest/wtjx/t12/src 4 conf_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/a/c/md2site/_xtest/wtjx/t12/conf 5 output_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/a/c/md2site/_xtest/wtjx/t12/output 6 bundle_path: /var/www/vhosts/devconf.northern-cross.info/httpdocs/a/c/md2site 7 7 storage_dir: storage-devconf 8 output_url: https://devconf.northern-cross.info/ c/md2site/_xtest/wtjx/t12/output8 output_url: https://devconf.northern-cross.info/a/c/md2site/_xtest/wtjx/t12/output 9 9 # full_download_url: https://devconf.northern-cross.info/c/md2site-web/_xtest/wtjx/t12/output/devconf2018.html 10 10 # partial_download_url: https://devconf.northern-cross.info/c/md2site-web/_xtest/wtjx/t12/output/devconf2018.html.tmp
Note: See TracChangeset
for help on using the changeset viewer.
![(trac.ini の [header_logo] セクションを設定してください)](/python/trac/Flist/chrome/common/trac_logo_mini.png)