Inhaltsverzeichnis
回复讨论(解决方案)
Heim Backend-Entwicklung PHP-Tutorial 200分求助CURL设置HTTPHEADER上传文件问题!

200分求助CURL设置HTTPHEADER上传文件问题!

Jun 23, 2016 pm 02:20 PM

哪位大侠有使用CURL设置HTTPHEADER来上传文件的经验?

求指点

PS:不是 '@'.文件名,而是Content-Type: application/octet-stream


回复讨论(解决方案)

curl不支持这种方式,你需要自己构造数据包。我研究过

curl不支持这种方式,你需要自己构造数据包。我研究过

是否有示例?

http://cn.php.net/fsockopen
CTRL + F搜索boundary,例子好好看看,构建一个文件上传的http请求头即可,按理说CURL构建同样的请求头应该也没问题。

总结一下项目中用到curl的几种方式 
1. php curl的默认调用方法,get方式访问url 
Java代码 
....   
    $ch = curl_init();   
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);    //设置http头   
    curl_setopt($ch, CURLOPT_ENCODING, "gzip" );         //设置为客户端支持gzip压缩   
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30 );  //设置连接等待时间   
    curl_setopt($ch, CURLOPT_URL, $url );   
    curl_exec( $ch );   
    if ($error = curl_error($ch) ) {   
        //出错处理   
        return -1;   
    }   
    fclose($fp);     
  
    $curl_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);        //获取http返回值   
    if( $curl_code == 200 ) {   
        //正常访问url   
    }   
    //异常   
....  

....
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);    //设置http头
    curl_setopt($ch, CURLOPT_ENCODING, "gzip" );         //设置为客户端支持gzip压缩
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30 );  //设置连接等待时间
    curl_setopt($ch, CURLOPT_URL, $url );
    curl_exec( $ch );
    if ($error = curl_error($ch) ) {
        //出错处理
        return -1;
    }
    fclose($fp);  

    $curl_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);        //获取http返回值
    if( $curl_code == 200 ) {
        //正常访问url
    }
    //异常
....
2. 设置http header支持curl访问lighttpd服务器 
Java代码 
$header[]= 'Expect:';     

$header[]= 'Expect:';   
3. 设置curl,只获取http header,不获取body: 
Java代码 
curl_setopt($ch, CURLOPT_HEADER, 1);     
curl_setopt($ch, CURLOPT_NOBODY, 1);     

curl_setopt($ch, CURLOPT_HEADER, 1);  
curl_setopt($ch, CURLOPT_NOBODY, 1);   
或者只获取body: 
Java代码 
curl_setopt($ch, CURLOPT_HEADER, 0);   // make sure we get the body   
curl_setopt($ch, CURLOPT_NOBODY, 0);   

    curl_setopt($ch, CURLOPT_HEADER, 0);   // make sure we get the body
    curl_setopt($ch, CURLOPT_NOBODY, 0); 
4. 访问虚拟主机,需设置Host 
$header[]= 'Host: '.$host;  
5. 使用post, put, delete等REStful方式访问url 
post: 
    curl_setopt($ch, CURLOPT_POST, 1 ); 
put, delete: 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");  //或者PUT,需要服务器支持这些方法。 
6. 保存下载内容为文件 
    curl_setopt($ch, CURLOPT_FILE, $fp); 

总结一下项目中用到curl的几种方式 
1. php curl的默认调用方法,get方式访问url 
Java代码 
....   
    $ch = curl_init();   
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);    //设置http头   
    curl_setopt($ch, CURLOPT_ENCO……

貌似没看到使用了CURLOPT_HTTPHEADER

http://cn.php.net/fsockopen
CTRL + F搜索boundary,例子好好看看,构建一个文件上传的http请求头即可,按理说CURL构建同样的请求头应该也没问题。

谢谢,CURL不支持这种上传方法吗?

可能是比较复杂吧,所以 curl 提供了 '@'.文件名 的方式。把构造头和数据的工作留给了自己

但 curl 依然提供了 CURLOPT_UPLOAD 来表示上传文件,但实际上使用了 PUT 请求
只适合向 ftp 上传文件
在 php 中,要从 php://input 读取

使用 #5 给出的代码,会产生 无法识别的请求 这样的错误,注释掉文件上传的那段,依然报这个错。不知是什么原因
但对比 curl PUT 方式的数据报,似乎也没有什么差异

知道了,这样写就可以!

$contents =<<< 'TEXT'数据报中应该是Content-Disposition: form-data; name="userfile"; filename="file_name"Content-Type: 文档类型文件内容这样的格式,我只实现了文件名部分,文档类型不知道如何实现。这样上传后就取不到 type 的值curl_upload_server.php<xmp><?phpprint_r($_FILES);echo "文件内容:\n";$p = current($_FILES);readfile($p['tmp_name']);TEXT;$fields['f"; filename="x.x'] = $contents; //这个关联键的写法很怪异吧?$ch = curl_init();  curl_setopt($ch, CURLOPT_URL,"http://localhost/curl_upload_server.php");  curl_setopt($ch, CURLOPT_POST, 1 );curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$s = curl_exec ($ch);  curl_close ($ch);  echo $s;
Nach dem Login kopieren

原来这样就有 type了

$varname = 'my';$name = '3.txt';$type = 'text/plain';$key = <<< TEXT$varname"; filename="$nameContent-Type: $typeTEXT;$fields[$key] = $contents;
Nach dem Login kopieren

注意:我是在 win 下的,linux 下要将 \n 换成 \r\n
没办法,早年的 sun 是拼不过 ms 的,现在也不行吧?

一直以为上传的文件类型是 php 识别的,却原来是浏览器提供的

原来这样就有 type了PHP code
$varname = 'my';
$name = '3.txt';
$type = 'text/plain';
$key = <<< TEXT
$varname"; filename="$name
Content-Type: $type

TEXT;
$fields[$key] = $contents;


注意:我是在 win 下的,linux 下……

很感谢,有没有比较完整的CURL 通过拼接HTTPHEADER信息上传的POST示例呢?

#10 就是
curl_upload_server.php 就是测试用服务器端

<br /> <?php <br /> print_r($_FILES); <br /> <br /> echo "文件内容:\n"; <br /> $p = current($_FILES); <br /> readfile($p['tmp_name']); <br /> </p> <p class="sougouAnswer"> <p class="modified_message"> 本帖最后由 xuzuning 于 2012-04-10 13:19:42 编辑 </p> 完整的代码 <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>$contents =&lt;&lt;&lt; 'TEXT'数据报中应该是Content-Disposition: form-data; name=&quot;userfile&quot;; filename=&quot;file_name&quot;Content-Type: 文档类型文件内容这样的格式以下是服务器端代码curl_upload_server.php&lt;xmp&gt;&lt;?phpprint_r($_FILES); //检查上传信息echo &quot;文件内容:\n&quot;;$p = current($_FILES);readfile($p['tmp_name']); //输出上传的文件TEXT;$varname = 'my';$name = '3.txt';$type = 'text/plain';$key = &quot;$varname\&quot;; filename=\&quot;$name\r\nContent-Type: $type\r\n&quot;;$fields[$key] = $contents;$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,&quot;http://localhost/curl_upload_server.php&quot;); curl_setopt($ch, CURLOPT_POST, 1 );curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$s = curl_exec ($ch); curl_close ($ch); echo $s;</pre><div class="contentsignin">Nach dem Login kopieren</div></div> </p> <p class="sougouAnswer"> http文件上传协议,主要是那个boundary,这个东西就是标识一个文件的内容和类型以及各种上传参数的token,其它和普通的POST提交也没啥区别。 <br /> <br /> fsockopen来写http请求就比较直白,用curl的话模拟对应的请求头和body就好了。 <br /> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;?php//what file you want to upload$uploadFile = file_get_contents(&quot;/var/www/index.html&quot;);//content boundary $boundary = md5(time());$postStr = &quot;&quot;;$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;;$postStr .=&quot;Content-Disposition: form-data; name=\&quot;uptxt\&quot;; filename=\&quot;index.html\&quot;\r\n&quot;;$postStr .=&quot;Content-Type: text/html\r\n\r\n&quot;;$postStr .=$uploadFile.&quot;\r\n&quot;;$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;; /** use fsockopen to set upload http header and body **/$fp = fsockopen(&quot;localhost&quot;,&quot;80&quot;,$errer,$errno,1);fwrite($fp,&quot;POST /upload.php HTTP/1.0\r\n&quot;);fwrite($fp,&quot;Content-Type: multipart/form-data; boundary=&quot;.$boundary.&quot;\r\n&quot;);fwrite($fp,&quot;Content-length:&quot;.strlen($postStr).&quot;\r\n\r\n&quot;);fwrite($fp,$postStr);while (!feof($fp)){ echo fgets($fp, 128);}fclose($fp);/** use curl instead **/$cl = curl_init('http://localhost/upload.php');$boundary = md5(time());curl_setopt($cl,CURLOPT_POST,true);curl_setopt($cl,CURLOPT_HTTPHEADER,array( &quot;Content-Type: multipart/form-data; boundary=&quot;.$boundary));curl_setopt($cl,CURLOPT_POSTFIELDS,$postStr);curl_setopt($cl,CURLOPT_RETURNTRANSFER,true);$content = curl_exec($cl);curl_close($cl);echo $content;?&gt;</pre><div class="contentsignin">Nach dem Login kopieren</div></div> <br /> <br /> upload.php <br /> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;?php print_r($_FILES);?&gt;</pre><div class="contentsignin">Nach dem Login kopieren</div></div> <br /> <br /> 结果 <br /> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>HTTP/1.1 200 OKServer: nginx/0.8.54Date: Tue, 10 Apr 2012 05:22:01 GMTContent-Type: text/htmlConnection: closeX-Powered-By: PHP/5.3.10Array( [uptxt] =&gt; Array ( [name] =&gt; index.html [type] =&gt; text/html [tmp_name] =&gt; /tmp/phpKHfxkY [error] =&gt; 0 [size] =&gt; 344 ))Array( [uptxt] =&gt; Array ( [name] =&gt; index.html [type] =&gt; text/html [tmp_name] =&gt; /tmp/phpB0se13 [error] =&gt; 0 [size] =&gt; 344 ))</pre><div class="contentsignin">Nach dem Login kopieren</div></div> <br /> <br /> <br /> <br /> </p> <p class="sougouAnswer"> 完整的代码PHP code <br /> $contents =<<< 'TEXT' <br /> 数据报中应该是 <br /> Content-Disposition: form-data; name="userfile"; filename="file_name" <br /> Content-Type: 文档类型 <br /> <br /> 文件内容 <br /> <br /> 这样的格式 <br /> 以下是服务器端代码 <br /> curl_upload_server.php <br /> <xmp> <br /> <?php <br /> print_r(…… <br /> <br /> 没有client? </p> <p class="sougouAnswer"> 完整的代码PHP code <br /> $contents =<<< 'TEXT' <br /> 数据报中应该是 <br /> Content-Disposition: form-data; name="userfile"; filename="file_name" <br /> Content-Type: 文档类型 <br /> <br /> 文件内容 <br /> <br /> 这样的格式 <br /> 以下是服务器端代码 <br /> curl_upload_server.php <br /> <xmp> <br /> <?php <br /> print_r(…… <br /> <br /> 最好能分开发一下,谢谢 </p> <p class="sougouAnswer"> http文件上传协议,主要是那个boundary,这个东西就是标识一个文件的内容和类型以及各种上传参数的token,其它和普通的POST提交也没啥区别。 <br /> <br /> fsockopen来写http请求就比较直白,用curl的话模拟对应的请求头和body就好了。 <br /> PHP code <br /> <?php <br /> //what file you want to upload <br /> $uploadFile = file_get_…… <br /> <br /> 非常感谢,CURL部分的代码我这边测试成功了,我再加一百分 </p> <p class="sougouAnswer"> #14 服务器端 <br /> #15 客户端 <br /> <br /> #14 中的 $contents 是待上传的文件内容 </p> <p class="sougouAnswer"> 上次好像看到你问的是一个文件切分多份,然后上传,如果是这样的话,你要要做的只是用boundary标识多个上传内容区块。比如 <br /> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>$boundary = md5(time());$postStr = &quot;&quot;;$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;;$postStr .=&quot;Content-Disposition: form-data; name=\&quot;uptxt[]\&quot;; filename=\&quot;index_1.html\&quot;\r\n&quot;;$postStr .=&quot;Content-Type: text/html\r\n\r\n&quot;;$postStr .=$uploadFile.&quot;\r\n&quot;; #这里是部分文件内容$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;;$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;;$postStr .=&quot;Content-Disposition: form-data; name=\&quot;uptxt[]\&quot;; filename=\&quot;index_2.html\&quot;\r\n&quot;; $postStr .=&quot;Content-Type: text/html\r\n\r\n&quot;;$postStr .=$uploadFile.&quot;\r\n&quot;;#这里是部分文件内容$postStr .=&quot;--&quot;.$boundary.&quot;\r\n&quot;;</pre><div class="contentsignin">Nach dem Login kopieren</div></div> <br> </p> <p class="sougouAnswer"> 收藏了! </p> <p class="sougouAnswer"> to #21 <br> 你这样做是不行的,应该使用 curl_multi 并发 <br> 不然把一个文件拆成几个, 一次性传出,再在服务器端组装。有什么意义? <br> </p> <p class="sougouAnswer"> 上次好像看到你问的是一个文件切分多份,然后上传,如果是这样的话,你要要做的只是用boundary标识多个上传内容区块。比如 <br> PHP code <br> $boundary   = md5(time()); <br> $postStr  = ""; <br> $postStr .="--".$boundary."\r\n"; <br> $postStr .="Content-Disposition: form-data; name=…… <br> <br> 我用了个循环来做 </p> <p class="sougouAnswer"> 引用 21 楼  的回复: <br> <br> 上次好像看到你问的是一个文件切分多份,然后上传,如果是这样的话,你要要做的只是用boundary标识多个上传内容区块。比如 <br> PHP code <br> $boundary   = md5(time()); <br> $postStr  = ""; <br> $postStr .="--".$boundary."\r\n"; <br> $postStr .="Content-Dispositi…… <br> <br> 感谢,curl_multi很有用 </p> <p class="sougouAnswer"> to #21 <br> 你这样做是不行的,应该使用 curl_multi 并发 <br> 不然把一个文件拆成几个,一次性传出,再在服务器端组装。有什么意义? <br> 说的也是哈,不过curl_multi的并发,对于请求不同的url后获取数据比较有意义,就是说是并行请求不同的url获取http返回。如果往同一url请求,要么就一次请求,要么就分发多次请求,多次请求有个性能消耗在于每次都要scoket连接/销毁,但是能控制请求字节数。 </p> <p class="sougouAnswer"> 引用 23 楼  的回复: <br> <br> to #21 <br> 你这样做是不行的,应该使用 curl_multi 并发 <br> 不然把一个文件拆成几个,一次性传出,再在服务器端组装。有什么意义? <br> <br> 说的也是哈,不过curl_multi的并发,对于请求不同的url后获取数据比较有意义,就是说是并行请求不同的url获取http返回。如果往同一url请求,要么就一次请求,要么就分发多次请求,多次请求有个性能消耗在于每…… <br> 忘了如果服务器支持keep-alive的话,无需进行多次socket create,呵呵 </p> <p class="sougouAnswer"> 一路上传不能充分利用网络资源,多路并发可使上传速度加快 <br> </p> <p class="sougouAnswer"> 引用 26 楼  的回复: <br> <br> 引用 23 楼  的回复: <br> <br> to #21 <br> 你这样做是不行的,应该使用 curl_multi 并发 <br> 不然把一个文件拆成几个,一次性传出,再在服务器端组装。有什么意义? <br> <br> 说的也是哈,不过curl_multi的并发,对于请求不同的url后获取数据比较有意义,就是说是并行请求不同的url获取http返回。如果往同一url请求,要么就一次请求,要么就分发多…… <br> <br> 嗯,基本上都支持keep-alive了 </p> <p class="sougouAnswer"> 一路上传不能充分利用网络资源,多路并发可使上传速度加快 <br> <br> 嗯,网络利用率更高 </p> <p class="sougouAnswer"> CSDN的编辑器还是没改进,同时回复多个还需要手动复制代码。。。 </p> <p class="sougouAnswer"> 嗯,服务器可开多线程/进程处理你的并发上传请求,这是快的缘故。 </p> <p class="sougouAnswer"> 只要资源够,多开几路并无大碍,至多大部被阻塞了,就相当于单路 <br> 设计成多路传输的好处还有,当某段数据传输失败时,可以重传这段。 <br> 这是单路传输设计做不到的 </p> <p class="sougouAnswer"> http://cn.php.net/fsockopen <br> CTRL + F搜索boundary,例子好好看看,构建一个文件上传的http请求头即可,按理说CURL构建同样的请求头应该也没问题。 <br> <br> 照着PHP手册里去做反而没成功 </p> <p class="sougouAnswer"> 引用 5 楼  的回复: <br> <br> http://cn.php.net/fsockopen <br> CTRL + F搜索boundary,例子好好看看,构建一个文件上传的http请求头即可,按理说CURL构建同样的请求头应该也没问题。 <br> <br> <br> 照着PHP手册里去做反而没成功 <br> 是吗?你不如用wireshark,smartsniff等工具查看http请求格式(firebug或者chrome自带的F12应该也可以),执行一次上传文件动作,然后观察文件上传时的http请求格式。 </p> <p class="sougouAnswer"> 贴个post的socket代码: <br> 我测试过的备份! <br> <br> http://webinno.cn/blog/article/view/40 <br> <br> </p> <p class="sougouAnswer"> CURLOPT_HEADERFUNCTION这个参数可以设置HTTP协议回调,你可以参考下 </p> <p class="sougouAnswer"> curl只要你设置些参数,然后他自己会生成协议头提交服务器 </p> <p class="sougouAnswer"> 谢谢大家! </p> <p class="sougouAnswer"> 我只用过Content-Type提供下载. </p> <p class="sougouAnswer"> 不错!!!!!! </p> <p class="sougouAnswer"> 我也要一份 </p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">Erklärung dieser Website</div> <div>Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heißer Artikel</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785841.html" title="Assassin's Creed Shadows: Seashell Riddle -Lösung" class="phpgenera_Details_mainR4_bottom_title">Assassin's Creed Shadows: Seashell Riddle -Lösung</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796789525.html" title="Was ist neu in Windows 11 KB5054979 und wie Sie Update -Probleme beheben" class="phpgenera_Details_mainR4_bottom_title">Was ist neu in Windows 11 KB5054979 und wie Sie Update -Probleme beheben</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785857.html" title="Wo kann man die Kransteuerungsschlüsselkarten in Atomfall finden" class="phpgenera_Details_mainR4_bottom_title">Wo kann man die Kransteuerungsschlüsselkarten in Atomfall finden</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796784440.html" title="&lt;🎜&gt;: Dead Rails - wie man jede Herausforderung abschließt" class="phpgenera_Details_mainR4_bottom_title">&lt;🎜&gt;: Dead Rails - wie man jede Herausforderung abschließt</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 Monate vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796793874.html" title="Wie kann ich KB5055523 in Windows 11 nicht installieren?" class="phpgenera_Details_mainR4_bottom_title">Wie kann ich KB5055523 in Windows 11 nicht installieren?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 Wochen vor</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/article.html">Mehr anzeigen</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Heiße KI -Werkzeuge</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>KI-gestützte App zum Erstellen realistischer Aktfotos</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>Online-KI-Tool zum Entfernen von Kleidung aus Fotos.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>Ausziehbilder kostenlos</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>KI-Kleiderentferner</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title"> <h3>Video Face Swap</h3> </a> <p>Tauschen Sie Gesichter in jedem Video mühelos mit unserem völlig kostenlosen KI-Gesichtstausch-Tool aus!</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/ai">Mehr anzeigen</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heißer Artikel</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785841.html" title="Assassin's Creed Shadows: Seashell Riddle -Lösung" class="phpgenera_Details_mainR4_bottom_title">Assassin's Creed Shadows: Seashell Riddle -Lösung</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796789525.html" title="Was ist neu in Windows 11 KB5054979 und wie Sie Update -Probleme beheben" class="phpgenera_Details_mainR4_bottom_title">Was ist neu in Windows 11 KB5054979 und wie Sie Update -Probleme beheben</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796785857.html" title="Wo kann man die Kransteuerungsschlüsselkarten in Atomfall finden" class="phpgenera_Details_mainR4_bottom_title">Wo kann man die Kransteuerungsschlüsselkarten in Atomfall finden</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 Wochen vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796784440.html" title="&lt;🎜&gt;: Dead Rails - wie man jede Herausforderung abschließt" class="phpgenera_Details_mainR4_bottom_title">&lt;🎜&gt;: Dead Rails - wie man jede Herausforderung abschließt</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 Monate vor</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/1796793874.html" title="Wie kann ich KB5055523 in Windows 11 nicht installieren?" class="phpgenera_Details_mainR4_bottom_title">Wie kann ich KB5055523 in Windows 11 nicht installieren?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 Wochen vor</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/article.html">Mehr anzeigen</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Heiße Werkzeuge</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Notepad++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_title"> <h3>Notepad++7.3.1</h3> </a> <p>Einfach zu bedienender und kostenloser Code-Editor</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/93" title="SublimeText3 chinesische Version" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 chinesische Version" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/93" title="SublimeText3 chinesische Version" class="phpmain_tab2_mids_title"> <h3>SublimeText3 chinesische Version</h3> </a> <p>Chinesische Version, sehr einfach zu bedienen</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/121" title="Senden Sie Studio 13.0.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Senden Sie Studio 13.0.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/121" title="Senden Sie Studio 13.0.1" class="phpmain_tab2_mids_title"> <h3>Senden Sie Studio 13.0.1</h3> </a> <p>Leistungsstarke integrierte PHP-Entwicklungsumgebung</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title"> <h3>Dreamweaver CS6</h3> </a> <p>Visuelle Webentwicklungstools</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/de/toolset/development-tools/500" title="SublimeText3 Mac-Version" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac-Version" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/de/toolset/development-tools/500" title="SublimeText3 Mac-Version" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac-Version</h3> </a> <p>Codebearbeitungssoftware auf Gottesniveau (SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/ai">Mehr anzeigen</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Heiße Themen</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/gmailyxdlrkzn" title="Wo ist der Login-Zugang für Gmail-E-Mail?" class="phpgenera_Details_mainR4_bottom_title">Wo ist der Login-Zugang für Gmail-E-Mail?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7722</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/java-tutorial" title="Java-Tutorial" class="phpgenera_Details_mainR4_bottom_title">Java-Tutorial</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1642</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>14</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/cakephp-tutor" title="CakePHP-Tutorial" class="phpgenera_Details_mainR4_bottom_title">CakePHP-Tutorial</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1396</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/laravel-tutori" title="Laravel-Tutorial" class="phpgenera_Details_mainR4_bottom_title">Laravel-Tutorial</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1289</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>25</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/de/faq/php-tutorial" title="PHP-Tutorial" class="phpgenera_Details_mainR4_bottom_title">PHP-Tutorial</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1233</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>29</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/de/faq/zt">Mehr anzeigen</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796787277.html" title="Alipay PHP SDK -Übertragungsfehler: Wie kann das Problem von 'Class Signdata nicht deklarieren' gelöst werden?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/174303625625009.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Alipay PHP SDK -Übertragungsfehler: Wie kann das Problem von 'Class Signdata nicht deklarieren' gelöst werden?" /> </a> <a href="https://www.php.cn/de/faq/1796787277.html" title="Alipay PHP SDK -Übertragungsfehler: Wie kann das Problem von 'Class Signdata nicht deklarieren' gelöst werden?" class="phphistorical_Version2_mids_title">Alipay PHP SDK -Übertragungsfehler: Wie kann das Problem von 'Class Signdata nicht deklarieren' gelöst werden?</a> <span class="Articlelist_txts_time">Apr 01, 2025 am 07:21 AM</span> <p class="Articlelist_txts_p">Alipay PHP ...</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796791139.html" title="Wie funktioniert die Session -Entführung und wie können Sie es in PHP mildern?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174386897193010.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Wie funktioniert die Session -Entführung und wie können Sie es in PHP mildern?" /> </a> <a href="https://www.php.cn/de/faq/1796791139.html" title="Wie funktioniert die Session -Entführung und wie können Sie es in PHP mildern?" class="phphistorical_Version2_mids_title">Wie funktioniert die Session -Entführung und wie können Sie es in PHP mildern?</a> <span class="Articlelist_txts_time">Apr 06, 2025 am 12:02 AM</span> <p class="Articlelist_txts_p">Die Hijacking der Sitzung kann in den folgenden Schritten erreicht werden: 1. Erhalten Sie die Sitzungs -ID, 2. Verwenden Sie die Sitzungs -ID, 3. Halten Sie die Sitzung aktiv. Zu den Methoden zur Verhinderung der Sitzung der Sitzung in PHP gehören: 1. Verwenden Sie die Funktion Session_regenerate_id (), um die Sitzungs -ID zu regenerieren. 2. Store -Sitzungsdaten über die Datenbank, 3. Stellen Sie sicher, dass alle Sitzungsdaten über HTTPS übertragen werden.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796790404.html" title="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174378264165720.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." /> </a> <a href="https://www.php.cn/de/faq/1796790404.html" title="Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs." class="phphistorical_Version2_mids_title">Erklären Sie JSON Web Tokens (JWT) und ihren Anwendungsfall in PHP -APIs.</a> <span class="Articlelist_txts_time">Apr 05, 2025 am 12:04 AM</span> <p class="Articlelist_txts_p">JWT ist ein offener Standard, der auf JSON basiert und zur sicheren Übertragung von Informationen zwischen Parteien verwendet wird, hauptsächlich für die Identitätsauthentifizierung und den Informationsaustausch. 1. JWT besteht aus drei Teilen: Header, Nutzlast und Signatur. 2. Das Arbeitsprinzip von JWT enthält drei Schritte: Generierung von JWT, Überprüfung von JWT und Parsingnayload. 3. Bei Verwendung von JWT zur Authentifizierung in PHP kann JWT generiert und überprüft werden, und die Funktionen und Berechtigungsinformationen der Benutzer können in die erweiterte Verwendung aufgenommen werden. 4. Häufige Fehler sind Signaturüberprüfungsfehler, Token -Ablauf und übergroße Nutzlast. Zu Debugging -Fähigkeiten gehört die Verwendung von Debugging -Tools und Protokollierung. 5. Leistungsoptimierung und Best Practices umfassen die Verwendung geeigneter Signaturalgorithmen, das Einstellen von Gültigkeitsperioden angemessen.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796788900.html" title="Beschreiben Sie die soliden Prinzipien und wie sie sich für die PHP -Entwicklung anwenden." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174360984159295.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Beschreiben Sie die soliden Prinzipien und wie sie sich für die PHP -Entwicklung anwenden." /> </a> <a href="https://www.php.cn/de/faq/1796788900.html" title="Beschreiben Sie die soliden Prinzipien und wie sie sich für die PHP -Entwicklung anwenden." class="phphistorical_Version2_mids_title">Beschreiben Sie die soliden Prinzipien und wie sie sich für die PHP -Entwicklung anwenden.</a> <span class="Articlelist_txts_time">Apr 03, 2025 am 12:04 AM</span> <p class="Articlelist_txts_p">Die Anwendung des soliden Prinzips in der PHP -Entwicklung umfasst: 1. Prinzip der Einzelverantwortung (SRP): Jede Klasse ist nur für eine Funktion verantwortlich. 2. Open and Close Principle (OCP): Änderungen werden eher durch Erweiterung als durch Modifikation erreicht. 3.. Lischs Substitutionsprinzip (LSP): Unterklassen können Basisklassen ersetzen, ohne die Programmgenauigkeit zu beeinträchtigen. 4. Schnittstellen-Isolationsprinzip (ISP): Verwenden Sie feinkörnige Schnittstellen, um Abhängigkeiten und nicht verwendete Methoden zu vermeiden. 5. Abhängigkeitsinversionsprinzip (DIP): Hoch- und niedrige Module beruhen auf der Abstraktion und werden durch Abhängigkeitsinjektion implementiert.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796787531.html" title="Wie debugge ich den CLI -Modus in PhpStorm?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/174277501469931.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Wie debugge ich den CLI -Modus in PhpStorm?" /> </a> <a href="https://www.php.cn/de/faq/1796787531.html" title="Wie debugge ich den CLI -Modus in PhpStorm?" class="phphistorical_Version2_mids_title">Wie debugge ich den CLI -Modus in PhpStorm?</a> <span class="Articlelist_txts_time">Apr 01, 2025 pm 02:57 PM</span> <p class="Articlelist_txts_p">Wie debugge ich den CLI -Modus in PhpStorm? Bei der Entwicklung mit PHPSTORM müssen wir manchmal den PHP im CLI -Modus (COMS -Zeilenschnittstellen) debuggen ...</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796786988.html" title="Wie setze ich nach dem Neustart des Systems automatisch Berechtigungen von Unixsocket fest?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/174304058392432.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Wie setze ich nach dem Neustart des Systems automatisch Berechtigungen von Unixsocket fest?" /> </a> <a href="https://www.php.cn/de/faq/1796786988.html" title="Wie setze ich nach dem Neustart des Systems automatisch Berechtigungen von Unixsocket fest?" class="phphistorical_Version2_mids_title">Wie setze ich nach dem Neustart des Systems automatisch Berechtigungen von Unixsocket fest?</a> <span class="Articlelist_txts_time">Mar 31, 2025 pm 11:54 PM</span> <p class="Articlelist_txts_p">So setzen Sie die Berechtigungen von Unixsocket automatisch nach dem Neustart des Systems. Jedes Mal, wenn das System neu startet, müssen wir den folgenden Befehl ausführen, um die Berechtigungen von Unixsocket: sudo ...</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796788902.html" title="Erklären Sie die späte statische Bindung in PHP (statisch: :)." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174360989012815.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Erklären Sie die späte statische Bindung in PHP (statisch: :)." /> </a> <a href="https://www.php.cn/de/faq/1796788902.html" title="Erklären Sie die späte statische Bindung in PHP (statisch: :)." class="phphistorical_Version2_mids_title">Erklären Sie die späte statische Bindung in PHP (statisch: :).</a> <span class="Articlelist_txts_time">Apr 03, 2025 am 12:04 AM</span> <p class="Articlelist_txts_p">Statische Bindung (statisch: :) implementiert die späte statische Bindung (LSB) in PHP, sodass das Aufrufen von Klassen in statischen Kontexten anstatt Klassen zu definieren. 1) Der Analyseprozess wird zur Laufzeit durchgeführt.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/de/faq/1796787536.html" title="Wie sende ich eine Postanforderung mit JSON -Daten mithilfe der Curl -Bibliothek von PHP?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/246/273/174269580466138.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Wie sende ich eine Postanforderung mit JSON -Daten mithilfe der Curl -Bibliothek von PHP?" /> </a> <a href="https://www.php.cn/de/faq/1796787536.html" title="Wie sende ich eine Postanforderung mit JSON -Daten mithilfe der Curl -Bibliothek von PHP?" class="phphistorical_Version2_mids_title">Wie sende ich eine Postanforderung mit JSON -Daten mithilfe der Curl -Bibliothek von PHP?</a> <span class="Articlelist_txts_time">Apr 01, 2025 pm 03:12 PM</span> <p class="Articlelist_txts_p">Senden von JSON -Daten mithilfe der Curl -Bibliothek von PHP in der PHP -Entwicklung müssen häufig mit externen APIs interagieren. Eine der gängigen Möglichkeiten besteht darin, die Curl Library zu verwenden, um Post � ...</p> </div> </div> <a href="https://www.php.cn/de/be/" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!</p> </div> <div class="footermid"> <a href="https://www.php.cn/de/about/us.html">Über uns</a> <a href="https://www.php.cn/de/about/disclaimer.html">Haftungsausschluss</a> <a href="https://www.php.cn/de/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1745624735"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> <script> document.addEventListener('DOMContentLoaded', function() { const mainNav = document.querySelector('.Article_Details_main1Lmain'); const header = document.querySelector('header'); if (mainNav) { window.addEventListener('scroll', function() { const scrollPosition = window.scrollY; if (scrollPosition > 84) { mainNav.classList.add('fixed'); } else { mainNav.classList.remove('fixed'); } }); } }); </script> </body> </html>