SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I tried using this little block of code to make use of the popular "user-friendly" database-produced pages:

    PHP Code:
    $array*=*explode("/"$PATH_INFO);
    $id $array[1];
    echo(
    $id); 
    I get this error:

    PHP Code:
    Fatal error:  Call to undefined function:  *explode() in /home/web/edevcafe/edevcafe.com/docs/docs.php on line 4 
    I tried switching to split(), but I got the same thing, save for the error, which said split() was undefined. However, later on that very same page, I call a function which uses explode() - what's the deal?

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there - have you tried the code seperately from the rest of the script?

    I cut and pasted and gave $PATH_INFO a value and it works fine - (unix) so I guess that there must be something up somewhere else in the code? - although PHP normally gets its errors pretty close?

    No help was I !

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, sorry. The file ran fine, and then I pasted those lines at the top - couldn't have gotten in the way of anything else. Maybe it was a temporary server glitch...I'll have to give it another try.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •