Search found 13 matches

by hema
Tue Nov 16, 2010 12:19 am
Forum: PHP coding => General
Topic: PHP Pass array
Replies: 0
Views: 317

Re: PHP Pass array

Hi,
Try this

Code: Select all

$array_variable = array("value1", "value2");
function_name($array_variable);
by hema
Thu Nov 11, 2010 12:28 am
Forum: PHP coding => General
Topic: PHP Directory Index
Replies: 1
Views: 468

Re: PHP Directory Index

Hi, Try this <?php echo "Index of /"; if ($handle = opendir('.')) { echo "<ul>"; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "<li><a href='$file' target='_blank'>$file</a></li>"; } } echo "</ul>"; closedir($handle); } ?>
by hema
Wed Nov 10, 2010 12:30 am
Forum: PHP coding => General
Topic: PHP Directory Index
Replies: 1
Views: 468

Re: PHP Directory Index

Hi,

Try this code

Code: Select all

<?php
if ($handle = opendir('.')) {
	echo "<ul>";
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            echo "<li>$file</li>";
        }
    }
	echo "</ul>";
    closedir($handle);
}
?>
by hema
Mon Nov 01, 2010 12:31 am
Forum: PHP coding => General
Topic: PDF page appears white
Replies: 0
Views: 299

Re: PDF page appears white

I think some of the file is missing regarding pdf creation.

Check whether the pdf creation script file is in on line server.

Regards,
R.Hema
by hema
Tue Oct 26, 2010 12:15 am
Forum: PHP coding => General
Topic: not getting the results i wanted
Replies: 1
Views: 464

Re: not getting the results i wanted

Hi, Try this code <?php $message = ''; if(isset($_REQUEST['submit'])) { $name=$_REQUEST['name']; $sub1=$_REQUEST['sub1']; $sub2=$_REQUEST['sub2']; $sub3=$_REQUEST['sub3']; $sub4=$_REQUEST['sub4']; $mark=$sub1 + $sub2 + $sub3 + $sub4; if (count($mark) > 0) { if ($mark >= 250 && $mark < 400 ) { $messa...
by hema
Thu Oct 14, 2010 12:26 am
Forum: PHP coding => General
Topic: mod rewrite To create SEO Friendly URL's Help
Replies: 0
Views: 296

Re: mod rewrite To create SEO Friendly URL's Help

Hi,

Try this htaccess code

Code: Select all

RewriteEngine on
RewriteRule ^http://www.site.com/(.*)/(.*)$ http://www.site.com/index.php?id=$1&cat=$2
RewriteRule ^http://www.site.com/(.*)$ http://www.site.com/index.php?id=$1
by hema
Thu Oct 14, 2010 12:05 am
Forum: PHP coding => General
Topic: Totally New to PHP
Replies: 1
Views: 716

Re: Totally New to PHP

Hi,

use this code

Code: Select all

<li><img src="<?php bloginfo('stylesheet_directory'); ?>/images/web.jpg" alt="Facebook" onclick="location.href='http://facebook.com'" /></li>
by hema
Thu Sep 30, 2010 12:10 am
Forum: PHP coding => General
Topic: Special character in php
Replies: 6
Views: 841

Re: Special character in php

Hi,

Use this code

Code: Select all

 echo htmlentities("Genérica"); 
use htmlentities() function for special character.

I hope this helpful to you :)
by hema
Sat Sep 25, 2010 12:14 am
Forum: PHP coding => General
Topic: I cant Upload image file in my website : PHP Error?
Replies: 1
Views: 443

Re: I cant Upload image file in my website : PHP Error?

Hi, write this code copy($HTTP_POST_FILES["uploadfile"]["tmp_name"], $_SERVER['DOCUMENT_ROOT']."upload/" . $maxid . $HTTP_POST_FILES["uploadfile"]["name"]); instead of copy($HTTP_POST_FILES["images"]["tmp_name"], $_SERVER['DOCUMENT_ROOT']."upload/" . $maxid . $HTTP_POST_FILES["uploadfile"]["name"]);
by hema
Thu Sep 23, 2010 12:21 am
Forum: PHP coding => General
Topic: Please Help Me!!, been at it for a full day...
Replies: 2
Views: 424

Re: Please Help Me!!, been at it for a full day...

Hi,

Make directory using mkdir($dir, 0777); instead of mkdir($dir, 0700);

The second argument specifies the permission.
by hema
Wed Aug 11, 2010 12:24 am
Forum: PHP coding => General
Topic: how to get folder directory name to variable
Replies: 0
Views: 328

Re: how to get folder directory name to variable

Hi,

We can get the current directory path by using getcwd()

$location = getcwd();
echo $location;

I hope this may be helpful to you.
by hema
Tue Aug 10, 2010 12:29 am
Forum: PHP coding => General
Topic: Adding a Time Stamp to a To-Do List
Replies: 0
Views: 352

Re: Adding a Time Stamp to a To-Do List

Hi,

use time() function to get timestamp value.
Ex: echo time();

see this below url to get date functions
http://php.net/manual/en/function.date.php
by hema
Wed Aug 04, 2010 12:31 am
Forum: PHP coding => Images
Topic: display images in order created
Replies: 0
Views: 805

Re: display images in order created

Hi,

U can display images in sort order by created date

Find this url http://webxadmin.free.fr/article/php-di ... te-209.php

I hope this may helpful to you.

Regards,
Mahe