SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: phpPolls script

Hybrid View

  1. #1
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using phpPolls script for my polls. In fact, I'm still testing it and configuring it to fit in my website. However, this snippet of code does work

    <? require('phpPollConfig.php3');
    require('phpPollUI.php3');
    poll_generateUI(3, "http://my.site.net/forwarder.html");
    ?>

    but this one

    <? require('\phpPolls\phpPollConfig.php3');
    require('\phpPolls\phpPollUI.php3');
    poll_generateUI(3, "http://my.site.net/forwarder.html");
    ?>

    does not.

    I have my website in C:\inetpub\wwwroot\mysite\...
    and phpPolls script files in C:\inetpub\wwwroot\mysite\phpPolls. When running it from there it works fine, but when i want to use it in my page and use the above code it doesn't work.


  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's because require needs a full system path depending on what your PHP include path is set to.

    If your PHP include path is C:\inetpub\wwwroot\mysite then the second code snippet should work, so you should set your include path to something like the above and it should work for you.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  3. #3
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Shouldn't he be able to just change the directory and call the script using a function?
    Wayne Luke
    ------------


  4. #4
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm..i'm a little confused right now...what do you mean with include path? where can i set it to what i want? btw is this include path something like classpath in java? i mean enviroment variable?

    Mare

  5. #5
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've found it....i hope it'll work now..

    thanks
    Mare


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
  •