• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_include_contents函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_include_contents函数的典型用法代码示例。如果您正苦于以下问题:PHP get_include_contents函数的具体用法?PHP get_include_contents怎么用?PHP get_include_contents使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_include_contents函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: validateData

function validateData($Data)
{
    if (!isset($Data['name']) || !isset($Data['phone']) || !isset($Data['email']) || !isset($Data['num_people']) || !isset($Data['notes_requests'])) {
        return false;
    }
    return true;
}
require_once 'lib/class.phpmailer.php';
include "lib/class.smtp.php";
// optional, gets called from within class.phpmailer.php if not already loaded
if (!validateData($_POST)) {
    echo json_encode($_POST);
    exit;
}
$Data = $_POST;
$body = get_include_contents('mail_template.php', $Data);
$mail = new PHPMailer();
$mail->IsSMTP();
// telling the class to use SMTP
$mail->SMTPDebug = 2;
// enables SMTP debug information (for testing)
$mail->SMTPAuth = true;
// enable SMTP authentication
$mail->SMTPSecure = "tls";
// sets the prefix to the servier
$mail->Host = "smtp.gmail.com";
// sets GMAIL as the SMTP server
$mail->Port = 587;
// set the SMTP port for the GMAIL server
$mail->Username = "[email protected]";
// GMAIL username
开发者ID:brunosk2,项目名称:project_cpsc_1030,代码行数:31,代码来源:send_mail.php


示例2: layout_json

function layout_json($filename, $arr = null)
{
    header("Pragma: no-cache");
    header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    #header('Content-Type: text/x-json; charset=utf-8');
    #header('Content-Type: text/x-json');
    #header('Content-Type: text/html; charset=iso-8859-1');
    return get_include_contents('tpl/json/' . $filename . '.php', $arr);
}
开发者ID:Kylemurray25,项目名称:wmlmusicguide,代码行数:9,代码来源:functions.php


示例3: recache_slider

 function recache_slider($lang)
 {
     global $sitepress;
     global $wpdb;
     $oldLang = ICL_LANGUAGE_CODE;
     $sitepress->switch_lang($lang);
     $string = get_include_contents("../wp-content/themes/futurestep/home-jobsslider.php");
     $query = sprintf("UPDATE `feedstore` SET `time`=CURRENT_TIMESTAMP, `output`='%s' WHERE language='" . $lang['language_code'] . "'", mysql_real_escape_string($string));
     $wpdb->query($query);
     $wpdb->print_error();
     $sitepress->switch_lang($oldlang);
 }
开发者ID:kitfrench,项目名称:Futurestep,代码行数:12,代码来源:fs-jobslider.php


示例4: flagShowSkin_banner_widget_default

function flagShowSkin_banner_widget_default($args)
{
    extract($args);
    $flag_options = get_option('flag_options');
    $skinID = 'id_' . mt_rand();
    // look up for the path
    $skinpath = trailingslashit($flag_options['skinsDirABS']) . $skin;
    $playlistpath = $flag_options['galleryPath'] . 'playlists/banner/' . $xml . '.xml';
    $js = $flag_options['skinsDirURL'] . $skin . "/jquery.cycle.lite.js";
    $data = file_get_contents($skinpath . '/settings/settings.xml');
    $flashBackcolor = flagGetBetween($data, '<property1>0x', '</property1>');
    if (empty($width)) {
        $width = flagGetBetween($data, '<width><![CDATA[', ']]></width>');
    }
    if (empty($height)) {
        $height = flagGetBetween($data, '<height><![CDATA[', ']]></height>');
    }
    $wmode = flagGetBetween($data, '<property0><![CDATA[', ']]></property0>');
    if (empty($flashBackcolor)) {
        $flashBackcolor = $flag_options['flashBackcolor'];
    }
    $params['autoPlay'] = flagGetBetween($data, '<autoPlay>', '</autoPlay>');
    $params['slideshowDelay'] = flagGetBetween($data, '<slideshowDelay>', '</slideshowDelay>');
    $alternate = get_include_contents($skinpath . "/jgallery.php", $playlistpath, $skin, $skinID, $width, $height, $params);
    // init the flash output
    $swfobject = new flag_swfobject($flag_options['skinsDirURL'] . $skin . '/gallery.swf', $skinID, $width, $height, '10.1.52', plugins_url('/' . FLAGFOLDER . '/') . 'skins/expressInstall.swf');
    global $swfCounter;
    $swfobject->add_params('wmode', $wmode);
    $swfobject->add_params('allowfullscreen', 'true');
    $swfobject->add_params('allowScriptAccess', 'always');
    $swfobject->add_params('saling', 'lt');
    $swfobject->add_params('scale', 'noScale');
    $swfobject->add_params('menu', 'false');
    $swfobject->add_params('bgcolor', '#' . $flashBackcolor);
    $swfobject->add_attributes('id', $skinID);
    $swfobject->add_attributes('name', $skinID);
    // adding the flash parameter
    $swfobject->add_flashvars('path', $flag_options['skinsDirURL'] . $skin . '/');
    $swfobject->add_flashvars('skinID', $skinID);
    $swfobject->add_flashvars('playlist', $xml);
    // create the output
    $out = '<div class="grandbanner ' . $wmode . '">' . $swfobject->output($alternate) . '</div>';
    // add now the script code
    $out .= "\n" . '<script type="text/javascript" src="' . $js . '"></script>';
    $out .= "\n" . '<script type="text/javascript" defer="defer">';
    $out .= $swfobject->javascript();
    $out .= "\n" . '</script>';
    $out = apply_filters('flag_show_flash_w_content', $out);
    return $out;
}
开发者ID:jasonralph,项目名称:jasonralph.org,代码行数:50,代码来源:banner_widget_default.php


示例5: a895_incparse

 function a895_incparse($root, $source, $parsemode, $return = false)
 {
     switch ($parsemode) {
         case 'textile':
             $source = $root . $source;
             $content = file_get_contents($source);
             $html = a895_textileparser($content, true);
             break;
         case 'txt':
             $source = $root . $source;
             $content = file_get_contents($source);
             // links erzeugen
             //$content = ereg_replace('http://www.', 'www.', $content);
             $content = preg_replace('/www\\./', 'http://www.', $content);
             $content = preg_replace("#(^|[^\"=]{1})(http://|ftp://|mailto:|https://)([^\\s<>]+)([\\s\n<>]|\$)#sm", "\\1<a class=\"jsopenwin\" href=\"\\2\\3\">\\3</a>\\4", $content);
             $html = '<pre class="plain">' . $content . '</pre>';
             break;
         case 'raw':
             $source = $root . $source;
             $content = file_get_contents($source);
             $html = $content;
             break;
         case 'php':
             $source = $root . $source;
             $html = get_include_contents($source);
             break;
         case 'iframe':
             $html = '<iframe src="' . $source . '" width="99%" height="600px"></iframe>';
             break;
         case 'jsopenwin':
             $html = 'Externer link: <a href="' . $source . '">' . $source . '</a>
   <script language="JavaScript">
   <!--
   window.open(\'' . $source . '\',\'' . $source . '\');
   //-->
   </script>';
             break;
         case 'extlink':
             $html = 'Externer link: <a href="' . $source . '">' . $source . '</a>';
             break;
     }
     if ($return) {
         return $html;
     } else {
         echo $html;
     }
 }
开发者ID:olien,项目名称:mysql_tools,代码行数:47,代码来源:function.a895_commons.inc.php


示例6: __toString

 public function __toString()
 {
     $classes = $this->classes;
     $classes[] = $this->slug;
     $result = '<section class="';
     $result .= implode(' ', $classes);
     $result .= '"';
     foreach ($this->contexts as $slug => $url) {
         $result .= ' data-url-' . $slug . '="' . $url . '"';
     }
     $result .= ' data-channel-name="' . $this->slug . '"';
     if (count($this->styles) > 0) {
         $result .= ' style="';
         foreach ($this->styles as $key => $value) {
             $result .= $key . ': ' . $value . ';';
         }
         $result .= '"';
     }
     $result .= '>';
     $result .= '<h1 class="channelname" onclick="toggleChannel($(this).closest(\'section\'));">' . $this->heading . '</h1>';
     if ($this->isHidden) {
         $result .= '<div class="content hiddenChannel">';
     } else {
         $result .= '<div class="content">';
     }
     if ($this->contentHTML != '') {
         $result .= $this->contentHTML;
     } else {
         if ($this->context != '' && isset($this->contexts[$this->context])) {
             $result .= get_include_contents($this->contexts[$this->context]);
         } elseif (isset($this->contexts['default'])) {
             $result .= get_include_contents($this->contexts['default']);
         } elseif (count($this->contexts) > 0) {
             $context_keys = array_keys($this->contexts);
             $result .= get_include_contents($this->contexts[$context_keys[0]]);
         }
     }
     $result .= '</div>';
     $result .= '</section>';
     return $result;
 }
开发者ID:iwu,项目名称:my.iwu.edu,代码行数:41,代码来源:_functions.php


示例7: dirname

" enctype="multipart/form-data">
<?php 
    if (empty($_POST['edit_template']) or get_var('edit_template') == "css") {
        if (empty($_POST['edit_theme'])) {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/css/style.css";
        } else {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . get_var('edit_theme') . "/css/style.css";
        }
    } else {
        if (empty($_POST['edit_theme'])) {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/" . get_var('edit_template') . ".php";
        } else {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . get_var('edit_theme') . "/template/" . $_POST['edit_template'] . ".php";
        }
    }
    $textarea = get_include_contents($themefile);
    $textarea = stripslashes($textarea);
    $textarea = htmlspecialchars($textarea);
    ?>
					<textarea id="template_data" name="template_data"><?php 
    echo $textarea;
    ?>
</textarea>
<?php 
    if (is_writable($themefile)) {
        ?>
					<dl class="selectionBox submitBox">
						<dt></dt>
						<dd>
							<div class="floatr" style="float:right;">
								<a class="fwdbutton" onclick="document.forms['template-data'].submit(); return false">
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:pages_themes.php


示例8: get_include_contents

}
// works
if ((include 'vars.php') == 'OK') {
    echo 'OK';
}
echo "<hr>";
$foo = (include 'include/return.php');
echo $foo;
// prints 'PHP'
//because the include was successful. Notice the difference between the above examples. The first uses return within
//the included file while the other does not. If the file can't be included, FALSE is returned and E_WARNING is issued.
$bar = (include 'include/noreturn.php');
echo $bar;
// prints 1
echo "<hr>";
$string = get_include_contents('include/return.php');
echo $var;
//PHP
echo $string;
//nothing (note)
function get_include_contents($filename)
{
    if (is_file($filename)) {
        ob_start();
        include $filename;
        return ob_get_clean();
    }
    return false;
}
?>
开发者ID:pixlr,项目名称:zce-1,代码行数:30,代码来源:include.php


示例9: bd_set_form_ml

function bd_set_form_ml($data)
{
    global $config, $wpdb;
    $update_form_ml = $data['form_ml'];
    $form_ml_mail = get_option('form_ml_mail', 'error');
    $bank_hour = $data['bank_hour'];
    $bank_date = $data['bank_date'];
    $data['bank_hour'] = str_replace('.', '', $data['bank_hour']);
    $data['bank_date'] = str_replace('/', '-', $data['bank_date']);
    $data['bank_date'] .= ' ' . $data['bank_hour'];
    $data['bank_date'] = date("Y-m-d H:i:s", strtotime($data['bank_date']));
    unset($data['bank_hour']);
    unset($data['submit']);
    unset($data['form_ml']);
    if ($update_form_ml > 0) {
        $update_form_ml = $wpdb->update($config['tables']['forms'], $data, array('id_form_ml' => $update_form_ml));
    } else {
        $data['ship_status_now'] = $config['STATUS']['POR_VERIFICAR']['id'];
        $wpdb->insert($config['tables']['forms'], $data);
    }
    /*echo $wpdb->last_query;
    	echo '\nValor Form ML 222: ', $update_form_ml;
    	echo $wpdb->print_error();
    	echo $wpdb->show_errors();*/
    //exit( var_dump( $wpdb->last_query ) );
    //$msj = get_include_contents('/template/mail/client_register.html.php');
    //var_dump($msj);
    $data['bank_hour'] = $bank_hour;
    $data['bank_date'] = $bank_date;
    $data['ship_state'] = $config['STATES'][$data['ship_state']];
    if ($wpdb->insert_id) {
        $dataHistories['id_form_ml'] = $wpdb->insert_id;
        $dataHistories['ship_status'] = $data['ship_status_now'];
        $dataHistories['comments'] = $data['ship_comments'];
        $dataHistories['time_modified'] = current_time('mysql');
        $dataHistories['id_user_modifier'] = get_current_user_id();
        $wpdb->insert($config['tables']['forms_histories'], $dataHistories);
        //echo $wpdb->last_query;
        $data['id_form_ml'] = $wpdb->insert_id;
        $data['ship_status_now'] = $config['STATUS'][$data['ship_status_now']]['name'];
        //Client
        $data['subject'] = $config['EMAIL']['new']['client']['subject'];
        $msj = get_include_contents('/template/mail/client_register.html.php', $data);
        //var_dump($msj);
        _send_mail($data['user_email'], $data['subject'], $msj);
        //Admin
        $to_admin = $config['EMAIL']['reply']['from'];
        $data['subject'] = sprintf($config['EMAIL']['new']['reply']['subject'], $data['bank_name'], $data['user_names']);
        $msj = get_include_contents('/template/mail/admin_register.html.php', $data);
        _send_mail($to_admin, $data['subject'], $msj);
        return '<p>Formulario Insertado con &Eacute;XITO</p>';
    } else {
        if ($update_form_ml === false || $update_form_ml == 0) {
            return '<p>Error al insertar el Formulario.</p>';
        } else {
            return '<p>Formulario actualizado con &Eacute;XITO</p>';
        }
    }
}
开发者ID:caicedo1089,项目名称:orders-ml,代码行数:59,代码来源:form_ml.php


示例10: get_include_contents

<?php

function get_include_contents($filename)
{
    if (is_file($filename)) {
        ob_start();
        include $filename;
        return ob_get_clean();
    }
    return false;
}
file_put_contents("cached_file.php", get_include_contents("template.php"));
开发者ID:jabouzi,项目名称:usermanager,代码行数:12,代码来源:cache.php


示例11:

		
	$adminPanel.="<div style='display:inline'> :: <a href='javascript:toggleVisibility(\"adminPanel\")';>Admin options</a></div>";
	
	if ($CONF_show_DBG_XML) {
		$adminPanel.="<div id=xmlOutput style='display:none; text-align:left;'><hr>";
		$adminPanel.="XML from paraglidingEarth.com<br>";
		$adminPanel.="<pre>$xmlSites1</pre><hr>XML from paragliding365.com<br><pre>$xmlSites2</pre></div>";
	}
	
	$adminPanel.="<div id='adminPanel' style='display:none; text-align:center;'><hr>";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateData'=>'1'))."'>"._UPDATE_DATA."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateMap'=>'1'))."'>"._UPDATE_MAP."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateCharts'=>'1'))."'>"._UPDATE_GRAPHS."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateScore'=>'1'))."'>"._UPDATE_SCORE."</a> ";
	
	$adminPanel.=get_include_contents(dirname(__FILE__)."/site/admin_takeoff_info.php");
}

$images="";
for ( $photoNum=1;$photoNum<=$CONF_photosPerFlight;$photoNum++){
	$photoFilename="photo".$photoNum."Filename";
	if ($flight->$photoFilename) {
		$images.="<a class='shadowBox imgBox' href='".$flight->getPhotoRelPath($photoNum).
				"' target=_blank><img src='".$flight->getPhotoRelPath($photoNum).".icon.jpg' border=0></a>";
	}		
}

// add support for google maps
// see the config options 
$localMap="";
$googleMap="";
开发者ID:WooSeungho,项目名称:leonardoxc,代码行数:30,代码来源:GUI_flight_show_ext.php


示例12: get_include_contents

$mail->Password = 'austin67';
// SMTP password
$mail->SMTPSecure = 'tls';
// Enable encryption, 'ssl' also accepted
$mail->Port = 587;
//Set the SMTP port number - 587 for authenticated TLS
$mail->setFrom('[email protected]', 'Kaylene');
//Set who the message is to be sent from
//$mail->addReplyTo('[email protected]', 'First Last');  //Set an alternative reply-to address
$mail->addAddress($email, $name);
// Add a recipient
//$mail->addAddress('[email protected]');               // Name is optional
//$mail->addCC('[email protected]');
//$mail->addBCC('[email protected]');
$mail->WordWrap = 50;
// Set word wrap to 50 characters
//$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
//$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true);
// Set email format to HTML
// $mail->SMTPDebug = 2;
$mail->Subject = $subject_line;
$variable['message'] = $message;
$mail->Body = get_include_contents('mail/confirmation.php', $variable);
$mail->Send();
if (!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
    exit;
}
echo 'Message has been sent';
开发者ID:GroupxDev,项目名称:HCRMASTER,代码行数:31,代码来源:contact.php


示例13: importStylesheet

 public function importStylesheet($filename)
 {
     $this->addStyle(get_include_contents($filename));
 }
开发者ID:RobinDumontChaponet,项目名称:cocktails,代码行数:4,代码来源:View.class.php


示例14: enviaEmail

function enviaEmail($tipoEmail, $nomePessoa, $emailPessoa, $novaSenha = null, $idPedido = null, $despacho = null, $cupomDesconto = null)
{
    if ($tipoEmail == 'novaSenha') {
        $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/nova-senha.php';
        $assunto = utf8_decode('Solicitação de nova senha');
        $_POST['nomePessoa'] = $nomePessoa;
        $_POST['novaSenha'] = $novaSenha;
    } else {
        if ($tipoEmail == 'situacaoPedido') {
            $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/pedido-realizado.php';
            $assunto = utf8_decode('Acompanhamento de Pedido');
            $_POST['idPedido'] = $idPedido;
            $_POST['despacho'] = $despacho;
        } else {
            if ($tipoEmail == 'cupomDesconto') {
                $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/cupom-desconto.php';
                $assunto = utf8_decode('Cupom Desconto');
                $_POST['cupomDesconto'] = $cupomDesconto;
            } else {
                if ($tipoEmail == 'divulgaListaCasamento') {
                    $query = "SELECT \r\n\t\t\t\t\t\tLICA.CONJUGE1+' & '+LICA.CONJUGE2 NOIVOS,\r\n\t\t\t\t\t\tLICA.URL,\r\n\t\t\t\t\t\tLICA.FOTO_CAPA\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\te_LISTA_CASAMENTO LICA\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\tLICA.ID_LISTA_CASAMENTO = " . $nomePessoa . "";
                    $valueQuery = $mysqli->ConsultarSQL($query);
                    $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/lista-casamento-email-divulgar.php';
                    $assunto = utf8_decode('Lista de Casamento de ' . $valueQuery[0]['NOIVOS']);
                    $_POST['nomeNoivos'] = $valueQuery[0]['NOIVOS'];
                    $_POST['urlListaCasamento'] = $valueQuery[0]['URL'];
                    $_POST['fotoCapa'] = $valueQuery[0]['FOTO_CAPA'];
                }
            }
        }
    }
    $html = get_include_contents($mensagem, $_POST);
    //printr($html);
    //Create a new PHPMailer instance
    $mail = new PHPMailer();
    //Tell PHPMailer to use SMTP
    $mail->IsSMTP();
    //Enable SMTP debugging
    // 0 = off (for production use)
    // 1 = client messages
    // 2 = client and server messages
    $mail->SMTPDebug = 0;
    //Ask for HTML-friendly debug output
    $mail->Debugoutput = 'html';
    //Set the hostname of the mail server
    $mail->Host = 'smtp.gmail.com';
    //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
    $mail->Port = 587;
    //Set the encryption system to use - ssl (deprecated) or tls
    $mail->SMTPSecure = 'tls';
    //Whether to use SMTP authentication
    $mail->SMTPAuth = true;
    //Username to use for SMTP authentication - use full email address for gmail
    $mail->Username = "[email protected]";
    //Password to use for SMTP authentication
    $mail->Password = "sprcomlines";
    //Set who the message is to be sent from
    $mail->SetFrom('[email protected]', 'Atendimento Comlines');
    //Set an alternative reply-to address
    $mail->AddReplyTo('[email protected]', 'Atendimento Comlines');
    //Set the subject line
    $mail->Subject = 'Atendimento Comlines - ' . $assunto;
    //Read an HTML message body from an external file, convert referenced images to embedded, convert HTML into a basic plain-text alternative body
    $mail->MsgHTML($html, dirname(__FILE__));
    //Replace the plain text body with one created manually
    $mail->AltBody = $assunto;
    //Attach an image file
    //$mail->AddAttachment('images/phpmailer_mini.gif');
    //Set who the message is to be sent to
    if ($tipoEmail != 'divulgaListaCasamento') {
        $mail->AddAddress($emailPessoa, $nomePessoa);
    } else {
        $emailPessoa = explode(',', $emailPessoa);
        foreach ($emailPessoa as $value) {
            $mail->AddAddress($value, '');
        }
    }
    if ($mail->Send()) {
        return true;
    } else {
        return false;
    }
    $mail->ClearAddresses();
}
开发者ID:jonathanbugs,项目名称:anselmi,代码行数:84,代码来源:funcoes.php


示例15: send_confirmation

function send_confirmation()
{
    global $link, $groupx_ClassTable;
    function get_include_contents($filename, $variablesToMakeLocal)
    {
        extract($variablesToMakeLocal);
        if (is_file($filename)) {
            ob_start();
            include $filename;
            return ob_get_clean();
        }
        return false;
    }
    $emailData = $_POST['emailData'];
    foreach ($emailData as $key) {
        $email = json_decode($key);
    }
    $user_email = $email->user_email;
    $eventID = $email->class_id;
    echo $user_email;
    $str_query = 'SELECT equipment FROM  `trilakes_groupx_classes`  WHERE `event_id` = ' . $eventID;
    $obj_result = mysqli_query($link, $str_query);
    while ($arr_line = mysqli_fetch_array($obj_result, MYSQLI_ASSOC)) {
        $arr_content = $arr_line;
    }
    $equipt = $arr_content['equipment'];
    $mail = new PHPMailer();
    $mail->isSMTP();
    // Set mailer to use SMTP
    $mail->Host = 'smtp.gmail.com';
    // Specify main and backup server
    $mail->SMTPAuth = true;
    // Enable SMTP authentication
    $mail->Username = '[email protected]';
    // SMTP username
    $mail->Password = 'austin67';
    // SMTP password
    $mail->SMTPSecure = 'tls';
    // Enable encryption, 'ssl' also accepted
    $mail->Port = 587;
    //Set the SMTP port number - 587 for authenticated TLS
    $mail->setFrom('[email protected]', 'PPYMCA');
    //Set who the message is to be sent from
    //$mail->addReplyTo('[email protected]', 'First Last');  //Set an alternative reply-to address
    $mail->addAddress($email->user_email, $_SESSION['user_name']);
    // Add a recipient
    //$mail->addAddress('[email protected]');               // Name is optional
    //$mail->addCC('[email protected]');
    //$mail->addBCC('[email protected]');
    $mail->WordWrap = 50;
    // Set word wrap to 50 characters
    //$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
    //$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
    $mail->isHTML(true);
    // Set email format to HTML
    // $mail->SMTPDebug = 2;
    $mail->Subject = 'GroupX Workout Confirmation';
    $variable['equipment'] = $equipt;
    $variable['instructor'] = $email->instructor;
    $variable['startTime'] = $email->startTime;
    $variable['className'] = $email->className;
    $variable['user_name'] = $_SESSION['user_name'];
    $mail->Body = get_include_contents('confirmation.php', $variable);
    $mail->Send();
    if (!$mail->send()) {
        echo 'Message could not be sent.';
        echo 'Mailer Error: ' . $mail->ErrorInfo;
        exit;
    }
    echo 'Message has been sent';
}
开发者ID:GroupxDev,项目名称:HCR,代码行数:71,代码来源:mail.controller.php


示例16: more_fields_write_js

function more_fields_write_js()
{
    $dir = plugins_url() . '/more-fields/images/';
    $js = get_include_contents('more-fields-js.php');
    return $js;
}
开发者ID:rssready,项目名称:WP-More-Fields,代码行数:6,代码来源:more-fields-field-types.php


示例17: fUpdateContent

\tfunction fUpdateContent(strC) {
\t\tvar ajax = new Ajax();
\t\tajax.responseType = Ajax.FBML;
\t\tajax.ondone = function(data) {
\t\t\tdocument.getElementById('dynamic').setInnerFBML(data);
\t\t\tFacebook.setPublishStatus(true);
\t\t}

\t\tajax.requireLogin = 1;
\t\tvar params = {'c':strC};
\t\tajax.post("{$strURL}{$strSCRIPT}",params);
\t}

\tfunction do_hello() {
\t\tvar dialog= new Dialog().showMessage('Dialog', 'Hello World.');
\t}
\t</script>

END;
$strResponse = "NO_METHOD?";
echo $_POST['method'];
if ($_POST['method'] == 'publisher_getFeedStory') {
    $templateid = '35834998919';
    $tokens = array("url" => "<a href='http://apps.facebook.com/birthdaybudy/'>Birthday Card</a>", "card" => "");
    $strResponse = sprintf($strJSON, json_encode('huh'), 'publisher_getFeedStory');
    $target_ids = array();
    $facebook->api_client->feed_publishUserAction($templateid, json_encode($tokens), implode(',', $target_ids), $body_general);
} else {
    $strResponse = sprintf($strJSON, json_encode($strContent . get_include_contents($strSCRIPT)), 'publisher_getInterface');
    echo $strResponse;
}
开发者ID:bobbyearl,项目名称:bobbyearl.github.io,代码行数:31,代码来源:attachment_newprofile.php


示例18: array

<?php

include 'code/config.php';
$messages = array();
// Include core functions
if (file_exists(PATH_CODE . 'functions.php')) {
    include PATH_CODE . 'functions.php';
} else {
    $messages[] = 'Core functions not found!';
}
// Include theme functions
if (file_exists(UNIX_THEME . 'functions.php')) {
    include UNIX_THEME . 'functions.php';
}
// Include theme template
if (file_exists(UNIX_THEME . 'template.php')) {
    $buildHtml = get_include_contents(UNIX_THEME . 'template.php');
} else {
    $messages[] = 'Theme template not found!';
}
echo $buildHtml;
$myFile = 'index.html';
$fh = fopen($myFile, 'w') or die("I cannot open the 'index.html' file!");
fwrite($fh, $buildHtml);
fclose($fh);
开发者ID:richpanzer,项目名称:ODS-Mobile---Supplement,代码行数:25,代码来源:index.php


示例19: validate

validate($_POST, $rules);
//Connect to database
require_once $_SERVER['DOCUMENT_ROOT'] . '/db/db_inc.php';
// make sure email does not already exist in personaldetails
if ($db->query("SELECT email FROM personalDetails WHERE email = '" . $_POST['email'] . "'")->num_rows > 0) {
    die("Email already registered. Please try with a different email.");
}
// make sure username does not already exist in userlogon
if ($db->query("SELECT username FROM userlogon WHERE username = '" . $_POST['username'] . "'")->num_rows > 0) {
    die("Username is already taken");
}
//insert into personalDetails
$sql = "INSERT INTO personaldetails (firstName, lastName, email, DOB) VALUES ('" . $_POST['fname'] . "', '" . $_POST['lname'] . "', '" . $_POST['email'] . "', '" . $_POST['dob'] . "')";
if (!$db->query($sql)) {
    die("There seems to be a problem on our side. Please try again later. ");
}
//insert in to userlogon
$personID = $db->insert_id;
$hash = password_hash(rand(0, 1000), PASSWORD_DEFAULT);
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
$sql = "INSERT INTO userlogon VALUES ('" . $_POST['username'] . "','{$password}', {$personID}, 'S', 'E', '{$hash}',0)";
if (!$db->query($sql)) {
    die("There seems to be a problem on our side. Please try again later. ");
}
$db->close();
//get_include_contents function
include 'php/filecontents.php';
//send mail
include_once 'mailer/sendmessage.php';
sendMessage($_POST['email'], $_POST['fname'], "Thanks for registering", get_include_contents('templates/registerTemplate.php'));
echo 0;
开发者ID:jamsch,项目名称:hobbiton-university,代码行数:31,代码来源:register.php


示例20: array

				<h1 class="title">File Checker</h1>

                  <div style="padding:15px; line-height:26px; margin-top:10px; margin-bottom:20px; background-color:#FFFFCC; border:2px dotted #CCCC33;">
                    <strong>If there is a fatal error below then your files were not uploaded properly<br />
					If there are no errors below then you are good to go! (There should be a login box if it worked)
                    </strong><br />
                  </div>

					<?php
                    	$files = array('a','b','check-user','footer','functions','graphs-guts','graphs','header','index','manager','quick-start','reports','speed-fix','update','api/adwords','api/runreport');
						
				
						
						foreach($files as $key => $value) {						
						    			           
						   get_include_contents($value.'.php');		
						
						}
						
					
					?>
                    
                   												
                    
                    
<br />




<?php
开发者ID:jprecht,项目名称:ppc-coach-tracker,代码行数:31,代码来源:install.php



注:本文中的get_include_contents函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_include_path函数代码示例发布时间:2022-05-15
下一篇:
PHP get_inactive_forums函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap