由买买提看人间百态

topics

全部话题 - 话题: php
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
q*********u
发帖数: 280
1
进入$PHP_SRC/ext下
./ext_skel --extname=vehicles
出来包括有vehicles.c, 按照论坛上的做法改成cpp了,并且应该extern "c"的地方都
写了
,比如:
vehicles.cpp中:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "ext/stardard/info.h"
}
#include "php_vehicles.h"
#ifdef COMPILE_DL_VEHICLES
extern "C" {
ZEND_GET_MODULE(vehicles)
}
#endif
和php_vehicles.h中:
#define PHP_VEHICLES_EXTNAME "vehicles"
#define PHP_VEHICLES_EXTVER "0.1"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h
l*******e
发帖数: 10
2
来自主题: BuildingWeb版 - 需要php/html方面的帮助
需要php编程,
$db = DbConn::GetConnect("Database");
$strSql ="SELECT * FROM `AAAtable` where userid= '$userid' ";
$countRows =$db->FetchRow($strSql);
$b="";//颜色。
if(!empty($countRows)){
$b="#ffffff";
}else
{
$b="eeeeee";
}
?>
用户名字
还没搞定,联络我msn: l*******[email protected]
x********1
发帖数: 183
3
来自主题: BuildingWeb版 - PHP simple question
you can try this code:
filename 'google.php'
echo "google"
?>
If you want to automatically redirection. let me know!
p**********e
发帖数: 316
4
来自主题: BuildingWeb版 - 哪里找PHP resources
本人正在学php和wordpress, 请问PHP高手,哪里可以找到有关php的资源?
s*****k
发帖数: 604
5
来自主题: BuildingWeb版 - php和其他CGI脚本语言的差别
有一个问题一直没搞明白就是php和其他CGI脚本语言例如perl的差别。
首先我一直不懂php配置成模块和配置成cgi运行是什么差别。反正我在windows apache
上没搞成功过配置成模块的。一直是cgi模式。
比如在perl里,你必须输出header
print "Content-type: text/plain;\n\n";
然后
print "

Hello World!

";
结果浏览器才会得到一个页面。
在php中
你只写一句
print "

Hello World!

";
就行了。
为什么会有这个差别?
m*****x
发帖数: 114
6
还有最后一个问题,
在读写文件时,出现问题:
Writing to test2.txt ...
Warning: file_put_contents(test2.txt) [function.file-put-contents]: failed
to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/
putcontents.php on line 4
Appending to test2.txt ...
Warning: file_put_contents(test2.txt) [function.file-put-contents]: failed
to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/
putcontents.php on line 6
也是permission的问题,我所有的.php和相关的东西都在/Applications/XAMPP/
xamppfiles/htdocs下... 阅读全帖
m*****x
发帖数: 114
7
还有最后一个问题,
在读写文件时,出现问题:
Writing to test2.txt ...
Warning: file_put_contents(test2.txt) [function.file-put-contents]: failed
to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/
putcontents.php on line 4
Appending to test2.txt ...
Warning: file_put_contents(test2.txt) [function.file-put-contents]: failed
to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/
putcontents.php on line 6
也是permission的问题,我所有的.php和相关的东西都在/Applications/XAMPP/
xamppfiles/htdocs下... 阅读全帖
c********l
发帖数: 8138
8
来自主题: BuildingWeb版 - IIS+PHP 如何debug??? (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: coupondeal (Coupon Deal), 信区: Programming
标 题: IIS+PHP 如何debug???
发信站: BBS 未名空间站 (Sun May 5 18:06:49 2013, 美东)
IIS+PHP 如何debug?
另外,如何查看PHP的log/console?
l*******7
发帖数: 61
9
各位高手:
我现在正在做一个项目,需要用php调用ipad中的摄像头进行拍照,然后上传照片。在
网上搜寻了一下,没有发现php的代码,请问这个功能可以用php实现吗?
十分感谢!
w*********r
发帖数: 2095
10
来自主题: BuildingWeb版 - 如何强制PHP生成的网页utf-8
我的网站的所有网页都用统一的header template, 包含了
一些网页的内容适用PHP动态生成的。为什么PHP中的中文到了网页就变成问号了,"???
???"
我该如何强制PHP生成的网页使用utf-8 encoding?
谢先了!
r**********d
发帖数: 510
11
来自主题: BuildingWeb版 - php DOM parse 中文乱码问题
我请教一个问题。
我想把 http://q.stock.sohu.com/app2/rpsholder.up?code=&sd=2013-7-13&ed=&type=date&dir=1&p=1
上的数据用 php DOM parse, 然后写道数据库中。 但
sohu encoding是gbk, php dom parse 后的encoding是ascii, 我 百度的很多, 试了
一些方法,都不能显示。
我现在只希望能在mysql 用utf8 ecoding 里显示中文。 然后我用 csmar数据做一些分
析。
各位大牛请指点迷津。我叮当包子相报。
$con = mysql_connect($host, $user, $pass);

if (!$con) {
echo "Could not connect to server\n";
trigger_error(mysql_error(), E_USER_ERROR);
} else {
echo "Connection established\n";
}
$ok = mysql_select_d... 阅读全帖
s*****l
发帖数: 2041
12
如果网站子目录里有.php, .html, .jpg....等文件
有没有办法只能访问除.php和.html以外的文件?
我能想到的办法就是用crontab,自动将.php和.html文件设置成不可读,
但是有没有什么更好的办法?
谢谢了。
f*****f
发帖数: 29
13
A well-known finance researcher is leading a small group conducting stock
market research.
The research is to discover major future stock movements, such as
merger and acquisition, by pinpointing advanced insider trades.
Significant successes have been made at this time through 8 years of
research. The group is expected to grow into a financial firm.
We are looking for one or two PHP programers who can work with large stock
market data. Knowledge of stock/option trading is a plus but not nec... 阅读全帖
s******8
发帖数: 2131
14
【 以下文字转载自 Programming 讨论区 】
发信人: summer98 (summer is not over), 信区: Programming
标 题: Looking for a PHP programmer
发信站: BBS 未名空间站 (Sun Apr 3 15:38:06 2011, 美东)
发信人: summer98 (summer is not over), 信区: WashingtonDC
标 题: Looking for a PHP programmer
发信站: BBS 未名空间站 (Sun Apr 3 15:35:48 2011, 美东)
Anyone interested doing a small PHP database interface project? We have
mysql datbases and want a nice web interface to qury and visualze the data.
Drop me a line if interested.
Thanks.
g***b
发帖数: 16
15
PHP Web Developer Co-op Opportunity
Job Description:
The co-op will work to extend the function of the proteomics pipeline and
build a protein annotation and function database:
• Develop web-based tools supporting the analysis of large proteomics
data sets.
• Focus on the coding, development and the maintenance of back-end
functionality.
• Design and develop pipelines to automate established analysis so
that same type data can be analyzed in a robust manner.
This is a full-time... 阅读全帖
g***b
发帖数: 16
16
https://xjobs.brassring.com/TGWebHost/jobdetails.aspx?jobId=707209&partnerid
=169&siteid=5140&codes=JINDED
PHP Web Developer Co-op Opportunity
Job Description:
The co-op will work to extend the function of the proteomics pipeline and
build a protein annotation and function database:
• Develop web-based tools supporting the analysis of large proteomics
data sets.
• Focus on the coding, development and the maintenance of back-end
functionality.
• Design and develop pipelines to a... 阅读全帖
r******n
发帖数: 170
17
来自主题: Database版 - 有熟悉php+mysql建web database的吗?
现在有Project需要,得在linux下用apache+php+mysql弄数据库的一些东西,不知道各
位有没有什么好点的书籍和网页可以推荐下?我以前简单在windows下用过点php嵌在
html里面做的GUI,mysql建的简单数据库,但是现在基于这个project(已有大概3k-4k
的php code),发现很多语法都没见过,由于没有文档,理解实在有些困难。不知道有
没有什么书籍可以系统的看看?
现在我是在CentOS5版本下建的环境,好容易才算是把东西都跑起来了。
s***s
发帖数: 1301
18
来自主题: Database版 - 有熟悉php+mysql建web database的吗?
找本php的书看看 ,先熟悉语法
OReilly.Programming.PHP.2nd.Edition.Apr.2006
我看的是这本
真正到做的时候,还是 查 php.net官方网站的文档 + google了。

4k
J*****u
发帖数: 44
19
来自主题: Database版 - PHP 和 .net
PHP 和 .net 到底哪个好啊?
感觉.Net的开发速度还是快很多啊。PHP的Framework有点乱!互不兼容!你要是不用
Framework去开发,PHP还是太慢了,很容易留下安全隐患。是不是最大的优点就是免费
了?
J*****u
发帖数: 44
20
来自主题: Database版 - PHP 和 .net
可是PHP在国内还是很火啊。 大批大批的门户都是PHP. 新浪微博貌似就是PHP,JSON搞
的!
b********2
发帖数: 855
21
来自主题: DotNet版 - ASP.NET和PHP
大家知道俺用.NET写了个小站。可是第一次的LOADING速度实在很不理想。后来在自己的SERVER上又装了个WORD PRESS玩。发现那个速度真的会飞了。我就困惑了,难道PHP真就比ASP.NET快?因为我是把MS SQL和MYSQL同时装在同一台电脑上,所以对比比较明显。今天又去了newegg.com,突然发现他们也是用.NET写的啊,还国内那个起点中文网,也是.NET做的,但是人家的速度就飞快。最后突然想,不会是别人的SERVER比我的好吧。越想越有这个可能。待我升级了SERVER再回来汇报。
昨天还随便GOOGLE了下两者的对比。在ASP.NET论坛上,SCOTT GU很肯定的说.NET比PHP快8-10倍。结果在STACKOVERFLOW上,又一边倒的说PHP比.NET快8-10倍。哎,真TMD困惑。
c**t
发帖数: 2744
22
来自主题: DotNet版 - ASP.NET和PHP
Did you check the links I posted back?

己的SERVER上又装了个WORD PRESS玩。发现那个速度真的会飞了。我就困惑了,难道
PHP真就比ASP.NET快?因为我是把MS SQL和MYSQL同时装在同一台电脑上,所以对比比
较明显。今天又去了newegg.com
PHP快8-10倍。结果在STACKOVERFLOW上,又一边倒的说PHP比.NET快8-10倍。哎,真TMD
困惑。
k****i
发帖数: 1072
23
来自主题: DotNet版 - ASP.NET和PHP
Cache.

己的SERVER上又装了个WORD PRESS玩。发现那个速度真的会飞了。我就困惑了,难道
PHP真就比ASP.NET快?因为我是把MS SQL和MYSQL同时装在同一台电脑上,所以对比比
较明显。今天又去了newegg.com,突然发现他们也是用.NET写的啊,还国内那个起点中
文网,也是.NET做的,但是人家的速度就飞快。最后突然想,不会是别人的SERVER比我
的好吧。越想越有这个可能。待我升级了SERVER再回来汇报。
PHP快8-10倍。结果在STACKOVERFLOW上,又一边倒的说PHP比.NET快8-10倍。哎,真TMD
困惑。
f******e
发帖数: 582
24
来自主题: Internet版 - PHP to display a dynamic network topology
I am using PHP based on Apache (on linux) to design a web page. One
question I am having is:
How to use PHP to display a dynamic graph? For example: how to use PHP to
display a network topology that may change periodically? Any tutorial in
this respect?
Thanks.
s********1
发帖数: 581
25
C/C++工程师需要懂java,javascript,PHP,或python吗?
在公司里C/C++工程师需要懂java,javascript,PHP,或python吗?
(1) 工作面试C/C++工程师的时候,知道java,javascript,PHP,或python有用吗?
(2)公司里遇到GUI或者web server方面的编程一般要C/C++工程师自己编,还是有专
门的GUI,web engineer来编?
Thanks.
s********e
发帖数: 893
26
来自主题: Java版 - php程序员转java求指教
用php mysql开发的web 2.0的网站不是很多吗?还有那些CMS象 drupal,wordpress都
是用的php。这么说php的功能应该是很强大的啊。
p*********t
发帖数: 2690
27
php是server side的语言,它其实是perl演变而来,apache+php+mySQL让它们3者功能强大。建立一个小数据库,查询数据库都很容易。而且3个软件都免费,很多公司都用。"通常认为这种搭配的执行效率比IIS+ASP+ACCESS要高,而后者的使用还必须另外交钱给微软"(引用自下面这个网站)。
这有perl,php,asp,jsp的比较
http://www.williamlong.info/archives/460.html

a*******s
发帖数: 324
28
来自主题: Programming版 - php+apache timeout 的问题
本地:php+apache server.
问题是:我用php远程连接到postgre数据库,然后把返回的数据显示到本地的页面。有
的query要运行1个多小时,返回的数据很小。我已经设了php的max_timeout =36000.
当postgre比较繁忙的时候,我的程序就有可能在运行了1两个小时后死掉(就是页面
停止了运行)。同样的程序在不繁忙的时候就可以运行完。
大家觉得是要改apache的配置么?怎么解决这个问题? 先谢过
s********1
发帖数: 581
29
C/C++工程师需要懂java,javascript,PHP,或python吗?
在公司里C/C++工程师需要懂java,javascript,PHP,或python吗?
(1) 工作面试C/C++工程师的时候,知道java,javascript,PHP,或python有用吗?
(2)公司里遇到GUI或者web server方面的编程一般要C/C++工程师自己编,还是有专
门的GUI,web engineer来编?
Thanks.
g***t
发帖数: 2278
30
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: grant (很吉利的id), 信区: SanFrancisco
标 题: 请教各位高手们PHP和Python是否和Ruby一样有Scalability的问题
发信站: BBS 未名空间站 (Mon Jan 4 14:35:16 2010, 美东)
Twitter 弃Ruby on Rail,但是并没有像Facebook一样选择了Php on Symfony,
而是选择了Scala.
请教各位高手们PHP和Python是否和Ruby一样有Scalability的问题?
我是不明白到底ROR的Scalability问题到底出在哪里?
D****r
发帖数: 309
31
来自主题: Programming版 - cgi vs. php for secured login
Hi guys,
I want to make a login page of a web for secured content.
But I don't which of the above 2 would be better. Reading from wiki for php,
it says >30% web-brocken has to do with php:
http://en.wikipedia.org/wiki/PHP#Security
How do you think this? is cgi better for my task, heard it is sort of perl?
thanks for your reply...
l**********r
发帖数: 4612
32
来自主题: Programming版 - 【失败感言】我是做PHP的 (转载)
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: MadDaemon (瘋一樣的男子), 信区: SanFrancisco
标 题: 【失败感言】我是做PHP的 (转载)
发信站: BBS 未名空间站 (Thu Nov 29 00:47:13 2012, 美东)
发信人: xiaopo (po), 信区: Joke
标 题: 【失败感言】我是做PHP的
发信站: BBS 未名空间站 (Wed Nov 28 23:31:15 2012, 美东)
我也不知道怎么回事,刚上场我说我是做PHP的,现场女嘉宾把灯全灭了!
c*********e
发帖数: 16335
33
【 以下文字转载自 Dreamer 讨论区 】
发信人: Dreamer (不要问我从哪里来), 信区: Dreamer
标 题: 怎么php是很多白人大专生在玩呢?本科的都玩java,c#?
发信站: BBS 未名空间站 (Thu Sep 19 17:37:09 2013, 美东)
难道本科不教php? 搞不懂。不過php工资比java,c# developer低些。
p*****w
发帖数: 429
34
也有,只是用的恰到好处.
http://php.net/manual/en/language.exceptions.php
作为scripting语言,他错误界定已经很明确了.所以在high-level定义就可以了.

php里面没有讨厌的try catch,觉得挺直接的,method还是叫function.
c*********e
发帖数: 16335
35
php和java,c#相比,到底差别在哪呢?在效率上,比java,c#差别在哪?感觉用php做的
网站也不错啊,這個mitbbs.com就是php写的,能同时支持这么多用户上线。
c*********e
发帖数: 16335
36
現在搞php的也有很多framework,比如zend.
看过一个公司網頁,前端用sencha ext js,后端php,做得非常漂亮,外行根本不知道是
php,java,还是c#做的。
c*********e
发帖数: 16335
37
en,感觉小公司,用php就能应付了。对了,用php能做web spider吗?
abc.com,nbc.com,cbs.com3个电视台里面,至少有一個是用php做的,非常绚丽的前台
,可能是因为图片高清的原因。
h******b
发帖数: 6055
38
来自主题: Programming版 - php这个板上是不是声名狼藉
我是business背景,但完全没有编程能力的人搞start up不太现实。 小时候作为爱好
用c写过小游戏后来就改行了。 现在想试图能稍微在搞prototype上出点力。 很多时
候用axure这种prototype工具感觉还不如直接写网页。
最近觉得php加codeigniter是糙快猛的极端。所有variable不用declare直接用,谷歌
上巨多库。 任何功能基本上就是copy/paste/整合,没有任何原创。
但听说过php不是真正编程的理论。 但搞start up执行速度永远第一,做大了有性能
问题了也就不是问题了。 是不是php是startup首选呢?
c*********e
发帖数: 16335
39
来自主题: Programming版 - php做大型网站到底咋样?
都说facebook是php写的,但是也听说它有些是java写的。
php用来做大网站,到底咋样?现在php的framework那么多,zend,yii,...
c*********e
发帖数: 16335
40
做模块,可以把一个模块放到一个php文件里,用的时候,在需要的地方用require_
once就行了。
比如header.php是header模块,footer.php是footer模块。每个网页都把这2模块加上
去。
f*******w
发帖数: 407
41
哈哈,这样就可以了:
$xx = Array('group_id' => '307378872724184',
'cir_id' => '221');
?>