print "Writing to disk\n";
$snp_list = array_unique($snp_list);
$results = "";
foreach ($snp_list as $snp_element) {
    $results .= $snp_element . "\n";
}
file_put_contents($light_rule_file_location, $owl . $rule_owl);
//light version of the ontology without subclasses of genotype marker variation.
file_put_contents($light_rule_demo_file_location, $owl . $rule_owl . file_get_contents($pharmacogenomic_CDS_demo_additions_file_location));
//light version of the ontology with the demo example.
file_put_contents($full_rule_file_location, $owl . $msc_owl . $rule_owl);
// Full version of the ontology without textual description of the genomic and phenotype rules.
file_put_contents($full_rule_demo_file_location, $owl . $msc_owl . $rule_owl . file_get_contents($CDS_rule_demo_additions_file_location));
// Full version of the ontology without textual description of the genomic and phenotype rules, and with a the demo example.
file_put_contents($CDS_server_file_location, $owl . $msc_owl . $textual_rule);
// Full version of the ontology but with only the textual description of the genomic and phenotype rules.
file_put_contents($CDS_server_demo_file_location, $owl . $msc_owl . $textual_rule . file_get_contents($CDS_rule_demo_additions_file_location));
// Full version of the ontology with only textual description of rules and the demo example.
file_put_contents($snp_groups_tab_separated_file_location, $snp_groups_tab_separated);
//Tab separated file with the information of SNP groups.
file_put_contents($allele_groups_tab_separated_file_location, $allele_groups_tab_separated);
//Tab separated file with the information of haplotype groups.
file_put_contents($phenotype_rules_tab_separated_file_location, $phenotype_rules_tab_separated);
//Tab separated file with the information of phenotype rules.
file_put_contents($drug_recommendations_tab_separated_file_location, $drug_recommendations_tab_separated);
//Tab separated file with the information of drug recommendation rules.
file_put_contents($allele_rules_tab_separated_file_location, $allele_rules_tab_separated);
file_put_contents($report_file_location, $report);
beep(2);
?>
 
示例#2
0
 * Created by IntelliJ IDEA.
 * User: lihuanpeng
 * Date: 15/8/25
 * Time: 22:48
 */
include './config.php';
for ($i = $start_page; $i <= $end_page; $i++) {
    // 初始化curl
    $list_handle = curl_init();
    // curl配置参数
    $options = [CURLOPT_URL => $list_url . $i, CURLOPT_RETURNTRANSFER => true, CURLOPT_USERAGENT => rand_user_agent()];
    curl_setopt_array($list_handle, $options);
    // 执行curl
    $pageContent = curl_exec($list_handle);
    if (curl_errno($list_handle)) {
        beep();
        alert('curl出错:' . curl_error($list_handle));
        alert('出错的URL是:' . $list_url . $i);
    } else {
        curl_close($list_handle);
        alert("第 {$i} 列表页html内容获取成功!");
    }
    $html = str_get_html($pageContent);
    $thread_lists = $html->find('tr[class=tr3 t_one]');
    foreach ($thread_lists as $thread_tr) {
        // 标题和链接地址
        foreach ($thread_tr->find('td h3 a') as $url) {
            $title = iconv('gb2312', 'utf-8//IGNORE', $url->innertext);
            $url = "http://t66y.com/" . $url->href;
        }
        // 回复数量