php

Can a PHP script unserialize a Storable file created with Perl?

Can a PHP script unserialize a Storable file created with Perl? ...

php and true type collection in gd

I try to use a true type collection "gulim.ttc" with 4 fonts in the GD libary. Like this: $font = "fonts/gulim.ttc"; imagettftext($im, 20, 0, 0, 25, $white, $font, $string); The Problem is, PHP/GD only uses the first font from the ttc-file but I need the third one called "Dotum". Or, is there a way to extract or convert the ttc-file...

nvl() function in php file

Hi I'm just looking through a php file and have come across the following code: switch (nvl($mode)) { case "add" : print_add_category_form(nvl($id, 0)); break; case "edit" : print_edit_category_form($id); break; } What does the nvl() function do?? ...

Problem in PHP mail

Dear All I am sending Reply Mail using PHP Those Who sended Mail to me. My Problem is When I send email It sits in SPAM folder .What to do inorder to deliver mail correctly.Any Idea or any change procedure? My Code. <?php $email_id="[email protected]"; $recipient = "@gmail.com"; //recipient $mail_body =...

Can't get PHP to work with mySQL on Vista 64

I'm running Vista 64 box, and attempting to setup Joomla using IIS7 (I like Joomla, I want to have some asp.net components on my web site, so that's why I want to use IIS7 and not Apache). It's my first time installing both php and mysql, so it's very possible that I'm doing something obviously wrong... though I think I tried enough diag...

How can I save sessions into mysql?

I need help regarding saving sessions into mysql. Right now I am using php normal sessions for my login system. Here is my code: auth.php <?php session_start(); include('db.inc.php'); $email=mysql_real_escape_string($_POST['email']); $pwd=mysql_real_escape_string($_POST['pwd']); $sql="Select member_id,email,password,nama,type from u...

Changing Parent for a Resource - Zend ACL - 1.7.3

Hello, We have a the following structure for our application require_once "Zend/Loader.php"; Zend_Loader::registerAutoload(); $acl = new Zend_Acl(); // application $acl->add(new Zend_Acl_Resource('application1')); // groups $acl->add(new Zend_Acl_Resource('group1'), 'application1'); $acl->add(new Zend_Acl_Resource('group2'), 'applicat...

What is the best method for creating your own Wordpress loops?

There seem to be three main ways to output content from Wordpress using its built-in functions, with WP_Query being the recommended one: WP_Query query_posts get_posts What are the differences between them? (I understand that WP_Query is the class, and the other two are methods). What is the cleanest way to have multiple loops on th...

Why are there so many PHP sites that only provide for MySQL as a database?

I've dabbled with MySQL and personally, I find it vastly inferior to better RDBMSs like Postgres; while I admit it's come a long way and improved, even the latest version to my knowledge does not even support CHECK constraints to verify data integrity (it allows the keyword but doesn't do anything with it). As someone who is looking at ...

How would I generate / parse this RESTful url in codeigniter

I'm new to MVC, being RESTful, and CodeIgniter and I'm trying to get into it in my spare time, so this is largely an academic question. I'm trying to build a url that will display the availability of a particular hotel room, for a particular hotel. I figured the RESTful way to do this would be http://url/Hotel/2/RoomAvailability/3/ ...

How to get the last field in a Mysql database with PHP ?

Hi I have mysql database and I want to get the last ID from field in a table . example : - id Value 1 david 2 jone 3 chris I want a function return 3 if this table exist . ...

Equivalent of ASP.NET HttpModules in PHP

what is the equivalent of ASP.NET HttpModules in PHP? If there are any how can I include them for that specific application (not globally) in other words what is the equivalent of web.config Example : I need to log the request and the headers, if the server is returning a HTTP 500 error irrespective of the code which is run. In ASP....

What are some examples of the limitations of PHP with JavaScript?

I'm looking for problems I can generalize, recognize later (in design), and say "Hey, if I continue down this road I'm going to hit trouble. PHP + JS just weren't meant for this." If I'm using PHP+JS.. what can't I do? What shouldn't I attempt? What do you suggest instead? Thanks! ...

How to get Google like speeds with php?

I am using PHP with the Zend Framework and Database connects alone seem to take longer than the 0,02 seconds Google takes to do a query. The wierd thing today I watched a video that said Google connects to 1000 servers for a single query. With latency I would expect one server for every query to be more efficent than having multiple serv...

How would you structure a forum's DB schema?

1I'm building a little forum for practice. I see that forums like phpBB store the thread text in a separate table. Why? Why not store it all in the same table? Some thing like:thread_id, thread_date, thread_text, thread_author Why is it done this way? How would you do it? ...

php regex : How do I match this registry pathing?

I'm not very good with regex and i've been kinda scratching my head on this one. I got the following php code using preg_match which is supposed to match all characters in the registry pathing except for the record number... which in this case is "record??]": <?php $reg_section = "[HKEY_LOCAL_MACHIN\SOFTWARE\INTERSTAR TECHNOLOGIES\XM...

how to write this in htaccess

I am using godaddy and what I want to do is when someone types in a domain address I want it to automatically redirect to a folder rather than placing the files on the root so its more organised. How do I write this in .htaccess? ...

How to use Arithmetic conditions and Operators in ActiveMQ/JMS Selectors using the Stomp protocol

I have several message with properties set. Some of these contain numeric data, although I have made no attempt to declare this explicitly to ActiveMQ while sending the messages. When I try to use arithmetic conditions, ie: <, >, <=, >= and family, I get an error. Is there any way to use arithmetic conditions using selectors via Stomp? ...

What factors make PHP Unicode-incompatible?

I am able use UTF-8 characters just fine in my scripts. As a matter of fact it is possible to have names of variables and functions contain Unicode characters. There is also the mb_string extension, which deals with multi-byte strings. Yet in countless articles, PHP is criticized for its lack of Unicode support. I don't get it; why is PH...

Finding all string in a PHP code base

I have a few-million-line PHP code base without true separation of display and logic, and I am trying to extract all of the strings that are represented in the code for the purposes of localization. Separation of display and logic is a long term goal, but for now I just want to be able to localize. In the code, strings are represented ...