Time of Update: 2016-06-23
我用網頁運行時正常,能發送,用命令運行php檔案時報錯,主要代碼經檢查無誤,如下 function sendmail($setEmail, $setName, $body, $subject) {require_once("PHPMail/phpmailer.php");$mail = new PHPMailer ( true ); // the true param means it will throw exceptions on errors, which we need to
Time of Update: 2016-06-23
$qty) { if($_POST[$isbn] == '0') { unset($_SESSION['cart'][$isbn]); } else { $_SESSION['cart'][$isbn] = $_POST[$isbn]; } } $_SESSION['total_price'] = calculate_price($_SESSION['cart']); $_SESSION['items'] =
Time of Update: 2016-06-23
比如有一個類Person 有一個資料庫操作類Conn Person裡面有一個操作是買回來一隻雞,雞的資訊要放到資料庫裡面去 應該怎麼設計? 是在perison裡麵包涵Conn類,然後執行個體化Conn對象,訪問資料庫插入資料,還是怎麼弄? 請高手指教! 回複討論(解決方案) class Person extends Conn{ function byji(){ $conn=new Conn;//執行個體化資料庫類
Time of Update: 2016-06-23
提交表單用INSERT INTO插入資料,但總是空白,沒提示出錯。請問那裡有問題了? @header("content-Type: text/html; charset=utf-8");require_once 'inc/site_config.php';require_once 'inc/db_connections.php';require_once 'inc/function.php';mysql_query('set character set "utf8"');
Time of Update: 2016-06-23
例如:表單form1有ID、age、sex欄位,分別對應一個INPUT文字框,輸入ID值,點擊查詢按鈕,action提交到PHP處理頁(mysql資料庫查詢),把查詢結果及ID欄位值顯示到form1相對應欄位的INPUT輸入文字框中;如何?這種顯示功能?新手求解?急!謝謝! 回複討論(解決方案) input value="$row[ID]" 假設你查詢出來的資料儲存在row數組中 在你HTML代碼裡這樣寫 " name="age" id="age" />
Time of Update: 2016-06-23
想把英文 度 這個特殊符號轉為"",一直沒調好怎麼寫,有人知道嗎?求助啊,謝謝! 回複討論(解決方案) 額 咋沒人解答呢 你直接上一下代碼吧,讓我們看看哪裡有問題 "zgy 90°"就是想把這個字串的溫度記號去掉啊 代碼1 $str="zgy 90°";echo str_replace('°', '', $str);:
Time of Update: 2016-06-23
我們都知道PHP的REQUEST_URI是包括查詢字串的,就是等於瀏覽器地址欄的內容,但是從apache的文檔上看到這個說明 REQUEST_URI The path component of the requested URI, such as "/index.html". This notably excludes the query string which is available as as its own variable named QUERY_STRING.
Time of Update: 2016-06-23
用AJAX POST方法傳遞到位save.php,save.php內容如下:
Time of Update: 2016-06-23
使用者名稱和帳號儲存在txt文本上,就是密碼驗證不了,我試過使用者名稱單獨驗證能成功,不知道哪裡錯了。。 $Logi = file ( "users.txt" ); $size = sizeof ( $Logi ); foreach( $Logi as $Key => $Val ) { $Data [ $Key ] = explode ( "|" , $Val ); } for( $K = 0 ; $K { $user = $Data [
Time of Update: 2016-06-23
圖片如:[img=http://hi.baidu.com/manager80/album/item/23c0d4c104b1e969e4dd3ba0.html#][/img] 圖片所在的頁面為a.htm 當我點擊圖片中的01地區時 就跳轉到指定的頁面比如頁面b.htm 其中b.htm中包含有{dede:include filename="head.htm"/} a.htm中的代碼:
Time of Update: 2016-06-23
我在php的拼字的sql語句,輸入後是這樣的 select * from `zx_solutions` where s_id = 6? 把這條語句放在資料庫中執行,報以下錯誤: [SQL] select * from `zx_solutions` where s_id = 6? [Err] 1054 - Unknown column '6?' in 'where clause' 請高手指點: 回複討論(解決方案) select *
Time of Update: 2016-06-23
mysql安裝測試報錯 Fatal error: Call to undefined function mysql_connect() in C:\myenv\apache\htdocs\test.php on line 3 1:我檢查了mysql已經啟動 extension=php_mysql.dll extension=php_mysqli.dll前面分號已經去掉 2:路徑已經更改 extension_dir = "C:/myenv/php/ext" 3:php5
Time of Update: 2016-06-23
1.用0到9十個數字構造一個二級目錄,每個目錄名字有2位元字如00/79並把所有的目錄列印出來? 回複討論(解決方案) #結果:Array ( [0] => 00 [1] => 01 [2] => 02 [3] => 03 [4] => 04 [5] => 05 [6] => 06 [7] => 07 [8] => 08 [9] => 09 [10] => 10 [11] => 11 [12] => 12 [13] => 13 [14] => 14 [15] => 15 [16]
Time of Update: 2016-06-23
這是page.class.phpurl = $url;//請求的URL$this->total = $total;//總記錄數//if($displaypg == '')$this->displaypg = $displaypg;//每頁顯示的記錄數$this->initDividePage();//初始化分頁類//echo ','.$this->displaypg;}//初始化分頁類private function initDividePage(){//分析URL$parse_url =
Time of Update: 2016-06-23
這是view裡的表單的代碼塊 這是php代碼 load->view('index');}function checklogin(){$this->load->model('test_m');$user=$this->test_m->user_select($_POST['name']);if($user){if($user[0]->upass==$_POST['pword']){echo "password
Time of Update: 2016-06-23
我裝的是appserv,其中http://localhost; http://localhost/phpinfo;都能正確的顯示,但是http://localhost/phpMyAdmin 怎麼也打不開,也更改了config.inc.php 裡的密碼,還是不行,求高手指教還有哪裡沒有配置好???? 回複討論(解決方案) 不是,appserv介面裡難道沒有按鈕可直接存取phpmyadmin的? 路過,輕鬆拿積分。 有吧 我用的是wamp 有可以直接開啟的
Time of Update: 2016-06-23
setcookie('uid', $id); 1.如果第三參數不傳,是不是就是退出瀏覽器cookie就失效? 2.我用jquery的$ajax調用php,php裡執行了setcookie('uid', $id, $cookietime, '/', '.xxx.net', 0); 在$ajax success裡reload了頁面,為什麼取不到cookie? 而且在%temp%\..\Temporary Internet Files目錄下也看不到對應網站的cookie檔案。
Time of Update: 2016-06-23
define('CACHE_FILE', '111.html');function callback($buffer) { file_put_contents(CACHE_FILE, $buffer, FILE_APPEND); return $buffer; //不需顯示頁面內容就 return '';}file_put_contents(CACHE_FILE, '');ob_start("callback", PHP_OUTPUT_HANDLER_START);
Time of Update: 2016-06-23
php+mysql的網站,從原來的windows搭建的平台移植到了centos伺服器的平台上,其他的都沒有問題,就是首頁導航看不到了,點了也不管用。 原來產生的首頁代碼: 院情概況 院情簡介 移植後產生的首頁代碼: " > " >
Time of Update: 2016-06-23
請問這段字元怎麼轉成數組?請教了 user_info|a:6:{s:7:"user_id";s:1:"1";s:9:"user_name";s:14:"pfliangcaijian";s:8:"reg_time";s:10:"1341130299";s:10:"last_login";s:10:"1363939627";s:7:"last_ip";s:9:"127.1.1.1";s:8:"store_id";s:1:"1";} 回複討論(解決方案) 人呢,