易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : php

PHP之父评价Facebook的HipHop项目:别当作银弹

来源于:http://news.csdn.net/a/20100205/216909.html
据《纽约时报》网站报道
,读写网记者与PHP的创造者Rasmus Lerdorf联系,询问他对Facebook刚刚开源的PHP优化项目HipHop有何看法。Lerdorf在邮件中说,这是一个很酷的项目,肯定会成为某些网站很好的选择。
但是,他接下来说,对于许多Web应用来说,执行速度并不是主要因素。即使将总请求成本中10%的代码的执行速度提高一倍,整体上也只提高了5%。
如果每次请求都要访问memcache/PostgreSQL/MySQL 10次,在系统调用上耗费大量时间,难免不要指望HipHop会带来奇迹。
Lerdorf称HipHop代码转换程序为漂亮把戏(nifty
trick),并担心会有开发人员将它错误地看成网站性能的某种魔弹。对于新的运行库,Lerdorf说,更愿意大家进行基本的性能分析
(profiling),找到有用中成本最高的部分。与其加速系统中较快的部分,不如加速或者去除系统中较慢的部分。
他还说,PHP的执行速度往往不是问题最大的地方,应该好好分析系统的各个方面,找到元凶。工具方面,他推荐用Yahoo的YSlow和
Google的Page
Speed分析前端的问题,再用Valgrind的Callgrind分析低层的后端性能,用XDebug分析用户空间PHP的性能。此外,他还顺带手指 ......

补上之前的:传Facebook重写运行库,PHP将大大加速

来源于:http://news.csdn.net/a/20100201/216819.html
CSDN报道
SDTimes高级编辑Alex Handy在博客
中爆料,上周Facebook邀请了PHP核心团队到公司讨论他们的新项目:从头重写的PHP运行库。周二他们将正式发布这个项目,并开源。
Handy相信,这是两年前Facebook招揽的一位PHP高手所为。
但也有网友在博客下留言说,Facebook开发的是一个PHP编译器,也就是说,Facebook版本的PHP将从一个动态语言变为预编译类型安全语言。这将能使PHP的速度提升10倍。
为什么Facebook要重写PHP运行库或者开发编译器呢?显然,PHP的速度和性能无法让Facebook满意。他们决定自己动手了。
也许是听说了这一消息,Google Android核心开发人员也是TestNG项目的创始人Cedric Beust在Twitter上说:
I love PHP for how quickly I get things done but hate it
for the ugly code it forces me to write. We need a real OO web language.
(我爱PHP,它使我能够很快地完成工作;我恨PHP,我不得不用它写下丑陋的代码。我们需要一个真正OO的Web语言。)
这个传闻的真相到底是怎样的呢?让我们拭目以待。 ......

windows下PHP環境搭建

http://topic.csdn.net/t/20040927/15/3412922.html
http://www.docin.com/p-23414672.html 
http://www.qqread.com/php/n652282101.html
http://www.51testing.com/?uid-65519-action-viewspace-itemid-142987
1    apache配置文件httpd.conf最後添加:
LoadModule php6_module "c:/php6/php6apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php6"
2    php.ini修改:
extension_dir = "C:\php6\ext"
extension=php_gd2.dll ......

Parsing JSON Data from PHP Using jQuery (ajax)

have been studying parsing JSON from PHP using AJAX to display it in
the client side and jQuery had been a great help to me. Here is a very
simple code in parsing JSON using jQuery that i made.
tablejsondata.php
This file makes the request to a php file and displays the returned data into a table.
<html>
<head>
<title>Parsing JSON from PHP Using jQuery</title>
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript">
</script>
</head>
<body>
<a href="#" id="loaduserdata">User Data</a>
<table id="userdata" border="1">
<thead>
<th>First Name</th>
<th>Last Name</th>
<th>Email Address</th>
<th>City</th>
</thead>
<tbody></tbody>
</table>
<script>
$(document).ready(function(){
});
$("#loaduserdata").clic ......

Parsing JSON Data from PHP Using jQuery (ajax)

have been studying parsing JSON from PHP using AJAX to display it in
the client side and jQuery had been a great help to me. Here is a very
simple code in parsing JSON using jQuery that i made.
tablejsondata.php
This file makes the request to a php file and displays the returned data into a table.
<html>
<head>
<title>Parsing JSON from PHP Using jQuery</title>
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript">
</script>
</head>
<body>
<a href="#" id="loaduserdata">User Data</a>
<table id="userdata" border="1">
<thead>
<th>First Name</th>
<th>Last Name</th>
<th>Email Address</th>
<th>City</th>
</thead>
<tbody></tbody>
</table>
<script>
$(document).ready(function(){
});
$("#loaduserdata").clic ......

解决PHP中文乱码问题

一.首先是PHP 网页的编码
1.php文件本身的编码与网页的编码应匹配
a. 如果欲使用gb2312编码,那么php要输出头:header(“Content-Type: text/html; charset=gb2312"),静态页面添加<meta http-equiv="Content-Type" content="text/html; charset=gb2312">,所有文件的编码格式为ANSI,可用记事本打开,另存为选择编码为ANSI,覆盖源文件。
b.如果欲使用utf-8编码,那么php要输出头:header(“Content-Type: text/html; charset=utf-8"),静态页面添加<meta http-equiv="Content-Type" content="text/html; charset=utf-8">,所有文件的编码格式为utf-8。保存为utf-8可能会有点麻烦,一般utf-8文件开头会有BOM,如果使用 session就会出问题,可用EditPlus来保存,在EditPlus中,工具->参数选择->文件->UTF-8签名,选择总是删除,再保存就可以去掉BOM信息了。
2.php本身不是Unicode的,所有substr之类的函数得改成mb_substr(需要装mbstring扩展);或者用iconv转码。
 
二.PHP与Mysql 的数据交互
PHP与数据库 的编码应一致
1.修改mysql配置文件my.ini或my.cnf,mysql最好用u ......

在php中输出xml

<?php
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="GBK" ?>';
echo '<users>';
echo '<user>';
 echo '<name>'; echo '小小菜鸟';
   echo '</name>';
   echo '<age>';
    echo '24';
   echo '</age>';
   echo '<sex>';
    echo '男';
   echo '</sex>';
echo '</user>';
echo '<user>';
   echo '<name>';
    echo '艳艳';
   echo '</name>';
   echo '<age>';
    echo '23';
   echo '</age>';
   echo '<sex>';
    echo '女';
   echo '</sex>';
echo '</user>';
echo '</users>';
?> ......
总记录数:2174; 总页数:363; 每页6 条; 首页 上一页 [155] [156] [157] [158] 159 [160] [161] [162] [163] [164]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号