Search Results

Search found 131 results on 6 pages for 'php4'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Creating an URL without global variables

    - by dygi
    I have a code like this below, which gives me a $link that equals to: http://mydomain.com/image/photo.JPG if (!empty($_SESSION['item'][$i])) { $path = dirname(__FILE__).'/image/'.basename($_SESSION['item'][$i]); if (move_uploaded_file($_SESSION['item'][$i], $path)) global $url; if ( $url ) { $link = $url.'/image/'.basename($_SESSION['item'][$i]); echo "<td><img src='" . $link . "' width='50' height='50' /></td>"; } } I wonder, how should I properly ommit using global variable here to achieve the same result.

    Read the article

  • PHP array manipulation

    - by user295189
    I have the code below . it looks for the case and creates an array of rows and columns. $pv->results[$row1][1][0] actually is $pv->result->[rownumber][coulmnnumber][0]. Now this is for only 2 columns as you can see. However I want an array like $myArr = array(0=>1, 1=>7, 2=>8, 3=>9 ) to be added below for column. What it is doing, is adding 4 columns (0,1,2,3) into the code below. So now I will have 4 cases instead of 2 cases as I need to more columns. Also the case value will not be 1 and 2, it will be 1, 7, 8 and 9 respectively. How can I do that? Thanks. for($i=0;$i<count($pv->rawData); $i++){ SWITCH ($pv->rawData[$i]->my ID){ CASE '1': $row1++; $pv->results[$row1][1][0] = $pv->rawData[$i]->data; break; CASE '2': $row2++; $pv->results[$row2][2][0] = $pv->rawData[$i]->data; break; }

    Read the article

  • php not showing all images

    - by jera
    I a writing a gallery app in php. The images are dynamically displayed through php. On each load of the page, not all images are showing. it does this randomly, on each load. I have not had this problem before, as I am new to php. My previous apps where all in perl, and I had no dynamic image display problems when using that language. check it here: http://dev.system-engine.com/dev/exec/pcli.php?R=%27/Paintings%27&cfg=%22fgal%22 all help appreciated. thank, Jer A

    Read the article

  • Generating Graph with 2 Y Values from Text File

    - by Joey jie
    Hi all, I have remade my original post as it was terribly formatted. Basically I would like some advice / tips on how to generate a line graph with 2 Y Axis (temperature and humidity) to display some information from my text file. It is contained in a textfile called temperaturedata.txt I have included a link to one of my posts from the JpGrapher forum only because it is able to display the code clearly. I understand that since it is JpGraph problem I shouldn't post here however the community here is a lot more supportive and active. Many thanks for all your help guys in advance! my code

    Read the article

  • PHP object class variable

    - by mck89
    I have built a class in PHP and I must declare a class variable as an object. Everytime I want to declare an empty object I use: $var=new stdClass; But if I use it to declare a class variable as class foo { var $bar=new stdClass; } a parse error occurs. Is there a way to do this or must I declare the class variable as an object in the constructor function? PS: I'm using PHP 4.

    Read the article

  • PHP write file... need help

    - by Jordan Pagaduan
    <?php $title = $_POST['title']; $filename = $title , ".php"; $fh = fopen($filename, 'w') or die ("can't open file"); $stringData = $title; fwrite($fh, $stringData); $stringData = $blog; fwrite($fh, $stringData); fclose($fh); ?> This is only a sample. What is the correct code for that?

    Read the article

  • What does "->" do or mean in PHP?

    - by mas2040
    i have seen this at a lot of place but have never understood its meaning or working... for example: // Registry $registry = new Registry(); // Loader $loader = new Loader($registry); $registry-set('load', $loader); if someone can elaborate this, i will be very greatful.. thanks in avance..

    Read the article

  • an better way to do this code

    - by user295189
    myarray[] = $my[$addintomtarray] //52 elements for ($k=0; $k <= 12; $k++){ echo $myarray[$k].' '; } echo ''; for ($k=13; $k < 26; $k++){ echo $myarray[$k].' '; } echo ''; for ($k=26; $k < 39; $k++){ echo $myarray[$k].' '; } echo ''; for ($k=39; $k <= 51; $k++){ echo $myarray[$k].' '; } how to shorten this array code...all I am doing here is splitting an array of 52 elements into 4 chunck of 13 elements each. In addition I am adding formation with br and space thanks

    Read the article

  • how to restrict a page to only a specified ip range in php

    - by Mac Taylor
    hey guys im looking for a way to restrict my administration page to only my own ip range concider my ip range is 215.67.. so in php i will begin with this : $myip = "215.67.*.*"; $myip = explode(".", $my_ip); $userip = getenv("REMOTE_ADDR") ; $userip = explode(".", $userip); if ($myip[0] == $userip[0] AND $myip[1] == $userip[1] ) { //Contunue admin } is there any better and more professional way to do it ?

    Read the article

  • Framework or CMS for php web development?

    - by rocknroll
    Hi all, I am a C++,Unix developer who has never dabbled in web development apart from creating simple HTML pages. I am going to change that and develop a website at a personal level soon. I am going to use php,mysql on a linux machine. In this regard I am browsing through relevant literature. The language isn't a problem but reading about CMS's and frameworks is confusing. And since I am new to web development, the number of CMS's and Frameworks are overwhelming. ? My question is do I need to have knowledge of one or more CMS' and/or Frameworks like Drupal,Joomla,Zend,Wordpress etc. If yes which is the best open source CMS' and/or Framework suggested for a newbie. ?? If the answer to the above question is yes, does the choice changes if one delves into the realms of commercial web development? Note:- I will be developing on a Linux machine, using open source tools. Thanks in advance

    Read the article

  • What does `?` stand for in SQL?

    - by user295189
    I have this SQL by a programmer: $sql = " INSERT INTO `{$database}`.`table` ( `my_id`, `xType`, `subType`, `recordID`, `textarea` ) VALUES ( {$my_id}, ?xType, ?subType, {$recordID}, ?areaText ) "; My question is why is he using ? before values? How do I see what values are coming in? I did echo and it shows ?xType as ?xType. No values. What does ? stand for in SQL?

    Read the article

  • how to get rid of empty elements

    - by user295189
    I have an array thats generated dynamically and it has some empty elements. How do I get rid of empty elements from an array? array 0 = string '' (length=0) 1 = string 'x%6wm' (length=5) 2 = string 'x%6wmvf' (length=7) 3 = string 'x%645' (length=5) 4 = string '' (length=0) And I want it to become like array 0 = string 'x%6wm' (length=5) 1 = string 'x%6wmvf' (length=7) 2 = string 'x%645' (length=5) Thanks

    Read the article

  • php HTTP_REFERER header, how to turn off or leave blank

    - by eco_bach
    Hi I'm using the following simple PHP proxy script but am getting a sporadic message at the destination site. I'm thinking that perhaps it may have something to do with the HTTP_REFERER header, although I'm not explicitly defining it. Can anyone tell me how to explicitly turn off or leave the HTTP_REFERER header blank? Thanks in advance! $url = $_GET['path']; readfile($path);

    Read the article

  • Have apache choose a php version based on the extension in the url, but with a single file on the filesystem

    - by Somejan
    I want to configure a local apache server to serve php files with different php versions. In my document root I have phpinfo.php, now if I go to http://localhost/phpinfo.php4, I want to see the phpinfo.php file processed with php4, if I go to http://localhost/phpinfo.php5 I want to see the same file processed with php5. Note: both php 4 and 5 are already installed side by side, I have no problem configuring apache to treat files that have a .php4 or .php5 extension on the filesystem with the correct php version. What I want is for apache to do the following: If the url-path ends in .php5, serve the file which has a .php extension on the filesystem using the application/x-httpd-php5 handler. If the url-path ends in .php4, serve the same file with the .php extension on the filesystem using the application/x-httpd-php4 handler.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >