PHP directory tree related questions, please answer, thank you very much

PHP directory tree problem, please answer, thank you very much Array( [0] => Array ( [cid] => 1 [pid] => 0 [mid] => 1 [sequence] => 0 [show] => 1 [type] => 0 [name] => News Center [urlname] => xinwenzhongxin [subname] => [image] => [class_tpl] => list.html [content_tpl] => content.html [page] => 10 [keywords] => [description] => [seo_content] => [content_order] => updatetime DESC [lang] => 1 [expand] => 0 [model] => content [mname] => News [admin_category] => content_category [admin_content] => content [cname] => News Center ) [1] => Array ( [cid] => 2 [pid] => 1 [mid] => 1 [ sequence] => 0 [show] => 1 [type] => 1 [name] => Industry News [urlname] => xingyexinwen [subname] => [image] => [class_tpl] => list.html [content_tpl] => content.html [page] => 10 [keywords] => [description] => [seo_content] => [content_order] => updatetime DESC [lang] => 1 [expand] => 0 [model] => content [mname] => News [admin_category] => content_category [admin_content] => content [cname] => Industry News ) [2] => Array ( [cid] => 7 [pid] => 2 [mid] => 1 [sequence] => 0

php writes XML file encoding error, please answer

The encoding of XML file written by php is wrong, please answerI have a video table, the data structure is as follows: I use the following program to read the files in the table and generate XML files: include(“conn.php”); include(“crop.php”); $xmlFile = “123.xml”; $dom = new DomDocument(‘1.0′,’utf-8’); $dom->formatOutput=true; $thumbnails = $dom->createElement(“thumbnails”); mysql_select_db(‘hdm0910283_db’, $lnk) or die (‘Can\’t use hdm0910283_db : ‘ . mysql_error()); mysql_query(“SET NAMES utf-8″); $sql=”select * from video”; $query=mysql_query($sql); while ($row = mysql_fetch_array($query)) { //Cut youku screenshot $imageurl=”../workshow/images/”.$row[imgname]; cutphoto(“$imageurl”,”$imageurl”,200,113); $dom -> appendChild($thumbnails); $thumbnail = $dom->createElement(“thumbnail”); $thumbnail->setAttribute(‘filename’, $row[imgname]); $thumbnail->setAttribute(‘label’, $row[title]); $thumbnail->setAttribute(‘url’, $row[url]); $thumbnails -> appendChild($thumbnail); } $dom->save($xmlFile); When running, the following error is prompted: arning: DOMElement::setAttribute() [domelement.setattribute]: string is not in UTF-8 in D:\AppServ\www\rj\control\xml_do.php on line 20 Warning: DOMDocument::save() [domdocument.save]: output conversion failed due to conv error, bytes 0xCA 0xD3 0xC6 0xB5 in D:\AppServ\www\rj\control\xml_do.php on line 24 I have tested the insertion and reading of data in the table and there is no problem. Please help me solve it. XML ——Solution——————–mysql_query(“SET NAMES utf8”); utf-8 is invalid

Problems related to php installation, always prompt various exceptions, please answer

PHP installation problems always prompt various errors, please answer I have configured PHP under Linux before, and now I want to build wamp, so I downloaded httpd-2.2.22-win32-x86-openssl-0.9.8t .msi and php5.2.17 compressed packages, create a new wamp folder in F, with four subfolders Apache2.2, PHP, Mysql, www (as the server home directory). Install apahce, php, and mysql in the corresponding packages respectively. , and then configure it according to http://www.win7china.com/html/13026.html. After configuration, the following problems occurred when testing phpCreate test.php in www, enter localhost in the browser /test.php, it always prompts the error The requested URL /test.php was not found on this server. Later, I checked the error log of apache and found that File does not exist: F:/wamp/Apache2.2/htdocs/test.php , so I wondered if it was because the DocumentRoot had not been changed. I checked the DocumentRoot result in the configuration file httpd.conf and found no problem, so I ignored it and put test.php directly into F:/wamp/Apache2.2/htdocs and tested again. localhost/test.php, this time there is no error The requested URL /test.php was not found on this server, but the content in test.php is directly displayed as follows:<?php phpinfo ();?>phpinfo() is not parsed; the page that displays the php iconI hope experts…

html-About PHP entry, please answer

php html Write your review! Spit it out, see everything Member Login | User Registration Recommended reading text Getting started with u3d Scene and scene roaming F: Get focus or double-click and hold alt: 360 rotation AlignViewtoSelected: Keep the camera and point consistent Hierarchy and scene building basic components: … [detailed] Crayon Shin-chan 2023-09-09 04:10:16 text Are you still using if else? (Transfer) The main difference between process-oriented design and object-oriented design is whether to use lengthy ifelse judgments in the business logic layer. If you are still using ifelse extensively, of course, except for the interface presentation layer, even if you use JavaC# which is completely oriented… [detailed] Crayon Shin-chan 2023-09-09 04:03:15

Use mac to implement php to develop socket, but it is directly lost in socket——blind, please answer

socketphp The relevant code is as follows, $socket=socket_create(AF_INET,SOCK_STREAM,$commonProtocol) or die(“cannot create socket\n”); / /Bind socket to port $result=socket_bind($socket,$host,$port) or die(“cannot bind port to socket\n”); //Start listening to this port $result=socket_listen($socket,4) or die(“could not set up socket listen\n”); //accept connection, another socket to handle communication $msgsock=socket_accept($socket) or die(“cannot accept incoming connection\n”); if($ msgsock){ echo date(“Y-m-d H:i:s D a”); } //Read the information sent by the client $input=socket_read($msgsock,1024) or die(“cannot read input\n”) ; $input=trim($input); $output=strrev($input). “The order is reversed\n”; //Process the received information and return to the client socket_write($msgsock,$ output,strlen($output)) or die(“cannot write”); //Close the socket connection socket_close($msgsock); socket_close($socket); Display directly on the web page cannot bind port to socket, please explain!

thinkphpAccessdenied. How to solve it, please answer

thinkphpAccessdenied. How to solve it, please answer

Test connection http://shangbiao.zhekd.com/index.php/Menu/guoji Response content: Test connection http://shangbiao.zhekd.com/index.php/Menu/guoji Is this a procedural problem? Is there something blocked in the construction method? Dude, 403. Is the correct url http://shangbiao.zhekd.com/index.php?cOntroller=Menu&action=guoji? All kinds of problems, the path is wrong, the route is not configured, there is no friendly error message…Find the answer yourself, and then create another question is better, no one can help you with your current questioning methodMore .

Php baidu online editor ueditor usage problem, please answer

//Can the past text of my post be directly saved to the database // Response content: //Can the past text of my post be directly saved to the database //

PHP array strange thing, please answer

class dd { const d = ‘d’; public function test() { $arr = array(); $arr[‘d’] = ‘test’; $arr2 = array( ‘a’ => ‘1’, ‘b’ => ‘2’, ‘c’ => ‘3’, ‘d’ => ‘4’ ); foreach ($arr2 as $key=>$value) { if (in_array($key,array(‘a’,’b’,’c’)) || isset($arr[‘self::d’])) { echo $key; } } } } $dd = new dd(); $dd->test(); Output: abc Why not output abcd ======== Supplement ======== In fact, what I really want to ask is, isn’t the single quote not parsed? Why echo $arr[‘self::d’]. The prompt is that the constant ‘self::d’ is not defined? The hint is to define ‘self::d’ not ‘d’. ======== I am the dividing line ======== Response content: class dd { const d = ‘d’; public function test() { $arr = array(); $arr[‘d’] = ‘test’; $arr2 = array( ‘a’ => ‘1’, ‘b’ => ‘2’, ‘c’ => ‘3’, ‘d’ => ‘4’ ); foreach ($arr2 as $key=>$value) { if (in_array($key,array(‘a’,’b’,’c’)) || isset($arr[‘self::d’])) { echo $key; } } } } $dd = new dd(); $dd->test(); Output: abc Why not output abcd ======== Supplement ======== In fact, what I really want to ask is, isn’t the single quote not parsed? Why echo $arr[‘self::d’]. The prompt is that the constant ‘self::d’ is not defined? The…

thinkphpAccessdenied. How to solve it, please answer

thinkphpAccessdenied. How to solve it, please answer

Test connection http://shangbiao.zhekd.com/index.php/Menu/guoji Response content: Test connection http://shangbiao.zhekd.com/index.php/Menu/guoji Is this a procedural problem? Is there something blocked in the construction method? Dude, 403. Is the correct url http://shangbiao.zhekd.com/index.php?cOntroller=Menu&action=guoji? All kinds of problems, the path is wrong, the route is not configured, there is no friendly error message…Find the answer yourself, and then create another question is better, no one can help you with your current questioning methodMore .

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索