yipeiwu_com6年前
一是PHP获取当前页面的网址: 复制代码 代码如下: //获得当前的脚本网址 function GetCurUrl() { if(!empty($_SERVER["REQUEST_URI...
yipeiwu_com6年前
复制代码 代码如下: <?php $url='test.php?1=1'; $contents="fjka;fjsa;#page#批量生成分成文件并且加上分页代码"; $ptext...
yipeiwu_com6年前
1 求长度,最基本的 $text = "sunny day"; $count = strlen($text); // $count = 9 2 字符串截取 截取前多少个字符 $artic...
yipeiwu_com6年前
复制代码 代码如下:function ($file_name,$pass_type=array('jpg','jpeg','gif','bmp','png')){ $yx_file =...
yipeiwu_com6年前
假如得到一个uid列表,数量在百万行以上,格式如下: 复制代码 代码如下: 10001000 10001001 10001002 ...... 10001000 ...... 10001...
yipeiwu_com6年前
复制代码 代码如下:function get_referer(){ $se = 0; $url = $_SERVER["HTTP_REFERER"]; //获取完整的来路URL $str...
yipeiwu_com6年前
于是便联想到PHP中的对象怎么样序列化存储性价比最高呢?接着想到了之前同事推荐的JSON编码和解码函数。 据他所说,json_encode和json_decode比内置的serializ...
yipeiwu_com6年前
复制代码 代码如下:<?php $url="http://www.golden-book.com/booksinfo/12/264.html"; $lines_array = fi...
yipeiwu_com6年前
以下说一下使用方法: 在要使用表单功能的页面的最上面输入如下代码 JHTML::_('behavior.formvalidation'); 然后把如下脚本加入页面上 复制代码 代码如下:...
yipeiwu_com6年前
复制代码 代码如下: <?php global $PHP_SELF; //echo $PHP_SELF; $t1=$_POST['textfield1']; $t2=$_POST[...