Hello Everyone,
I have make one cron job as below
<?php
echo "HI";
?>
When i ran it using cron job it give me error "?php directory not found"
Please help me regarding this.
Thanks in advance.
Kanji
...
First of all: A quite similar problem has been posted and somehow solved already, but is still not answering my specific problem. More about this later.
In words: I have a base class which provides some methods to all childs, but doesn't contain any property. My child is inheriting these methods, which should be used to access the child...
I've created 2 controllers in my Yii application: FirstController.php and SecondController.php in default controller path.
FirstController.php:
<?php
class FirstController extends Controller {
public static function returnFunc() { return 'OK'; }
}
SecondController.php:
<?php
class SecondController extends Controller {
public f...
For years I have done something like this:
config.php
<?php
$db = array("user" => "username", "pass" => "password");
functions.php
<?php
require_once('config.php');
function connectToDatabase() {
$dbc = new PDO($dsn, $db['user'], $db['pass']);
// Do some stuff ...
}
I've just read the PHP manual and that...
Hello,
I am new to PHP and would like to ask, what will be the best possible way to declare application level variables and Database connection Strings or configrations.
How these application level variables are accessible to my Scripts.
...
Hi,
I've used CakePHP a few times before but this is the first time I'm trying out Bake. On my Mac I'm running CakePHP 1.3, PHP5.3.3, and MySQL. I've created my database tables and the app connects to the database.
I navigate to the console folder. and type ./cake
I get welcome to the CakePHP v.1.3.5 Console. Then I gives me a list o...
Hi All,
How can I pass the parameters in web service using this request:
POST /webservice/User.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://sample.com/UpdateUserBatch"
<UpdateUserBatch xmlns="http://sample.com/">
<auth>
<Username>string</Username>
<Password>string</P...
My current code is this:
$select = $this->select()
->from(array('r' => 'recipes'), $this->getAdapter()
->quoteInto("r.*, MATCH(title, directions) AGAINST(?) AS score", $searchText))
->where('MATCH(title, directions) AGAINST(?)', $searchText);
//SQL: SELEC...
I run PHP on IIS6. I have some PHP that successfully sends a 1KB image as an attachment on an email. When I try and attach a 500KB PDF however (having changed the Content-Type), it hangs and after a few minutes I get "FastCGI process exceeded configured request timeout" (Error Number 258 (0x80070102)).
Any thoughts on why it's taking ...
Hi,
I'm trying to display an extended character on a mobile phone. The ascii value of 160 on my windows machine is á.
According to http://slayeroffice.com/tools/ascii/ the ascii value of á is 225. Which one is correct ?
Can different hardware devices such as phones have a different ascii character set or do they all follow a standard ...
I have a hard-coded menu in Drupal (as it's too complex for the standard Menu system in Drupal).
I would like to be able to say: If this page is contained within the /about/ directory, apply the class "active", so that all new pages created within this directory automatically highlight the current section.
Currently I have:
$current_p...
I recently discovered a new PHP CRM/ERP solution: http://www.ws3.es/portal/es/saltos.htm
We are looking for a open source intranet solution, mainly to manage projects, client accounts, corporative email, etc. We've been testing it and it looks good, but my question is if someone else has given it a try?
...
I'm having trouble with this query. I have 2 date coming from textboxes (don't worry I've taken the necessary sql injection steps). They are used to query a MS SQL Server DATETIME field. I'm getting this error:
Conversion failed when converting date and/or time from character string
Here my code:
//formatting my strings
$from = str...
I found a few Zend sample applications but all of them use Zend_DbTable. Does anyone know of a full Zend example application built with Propel to learn from?
...
I want to upload video to server and then display it on web page using some player (like youtube) using PHP.
My client ask: "Videos must be no longer than 2 minutes and in either Quicktime, WMV, Mp4 or FLV format."
Is there any opensource script which help me to upload a video with client requirements and then an opensource player whic...
I have a problem, where I have two third party libraries classes that I have to extend and use together. But both have the same naming convention and two class name end up having the same name.
Since I cannot extend two classes, I don't know how to fix them, how to create a wrapper against one. I cannot use PHP Namespaces as the PHP ver...
I'm resizing images with php gd. The result is image resources that i want to upload to Amazon S3. It works great if i store the images on disk first but i would like to upload them directly from memory. That is possible if i just know the bytesize of the image.
Is there some way of getting the size (in bytes) of an gd image resource?
...
hi ,
i want to upload profile pic like facebook and ajax upload the image and crop with the fix size
and ajax upload to server .
in jquery ,php ,
how can i do it ?
thanks
rahul
...
How can i do a select from a variable received from a form?
I have the following code but i think that i cannot do this : '%'.$texto.'%'
$busqueda=$_POST['texto'];
$tipo=$_POST['tipo'];
if($tipo='titulo')
$res=mysql_query("SELECT * FROM LIBRO WHERE LI_TITULO like '%'.$texto.'%'",$conexion);
What should i do? Thank you for your...
Hello ,
As the title says ... I have tried to use the following code to execute a PHP script when user clicks a button in my Java Swing application :
URL url = new URL( "http://www.mywebsite.com/my_script.php" );
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
But nothing happens ... Is there someth...