Tag: require
Posts of Tag: require
  1. Solve Error Uncaught ReferenceError: require is not defined in Node.js

    Solve Error Uncaught ReferenceError: require is not defined in Node.js While working with Node JS, you might be familiar with the require() and sometimes, it shows error like Uncaught ReferenceError: requi...Learn More
    JavaScriptNodejsrequireProgramming LanguagesFramework
  2. Problem with using require inside a function and variable scope

    I'm using an MVC setup and I'm trying to inject javascript into my views (.php), yet allow the javascript access to all the variables that the view has access to. My end goal is to be able to access PHP variabl...Learn More
    PHPScoperequireProgramming Languages
  3. php require class call from inside method

    from my understanding, require pastes code into the calling php file. what if you were requiring from inside a method...it would paste the entire code/class inside the method, blocking the next statement in the...Learn More
    PHPOOPClassrequireProgramming Languages
  4. Ruby require 'file' and relative location

    So I'm writing some rspec tests and I'm embarrassed at my lack of Ruby understanding. I have a file structure that looks like the following: GUI_Tests/Tests/test_spec.rb GUI_Tests/windows_gui.rb GUI_Tests/...Learn More
  5. Difference between "include" and "require" in php

    Is there any difference between them? Is using them a matter of preference? Does using one over the other produce any advantages? Which is better for security? ...Learn More
    PHPincluderequireProgramming Languages
  6. How expensive is: require "foo.pl";

    I'm about to rewrite a large portion of a project that I have developed over the last 10years while learning perl. There is alot of optimisation that can be gained. A key part of the code is a large if/elsif bl...Learn More
  7. Require returns an array instead of a boolean

    According to the documentation for Kernel#require the method returns a boolean value. I noticed in a IRB session however that for some files require returns an array. ruby-1.8.7-p330 :001 > require 'net/...Learn More
  8. How can I correctly require a file and make use of it's variables?

    I am writing a simple PHP script that make use of DB to export some products. My code starts like $host = "localhost"; $user = ""; $pass = ""; $database = ""; letting user to add those info. However is there a...Learn More
    PHPClassrequireProgramming Languages
  9. Include 'regular' .php file in symlinked .php file

    So, I have a project with config files. When I deploy my code, I don't want the config files of individual servers to be overwritten, do I made a symlink that points to /var/www/config/config.php. That works fi...Learn More
    PHPSymlinkrequireProgramming Languages
  10. Perl: how to make variables from requiring script available in required script

    example out.pl: (my|our|local|global|whatever???) var = "test"; require("inside.pm"); inside.pm: print $var; I don't want to use packages - it's overwhelming my needs :) thanks! ...Learn More
  11. Which is faster XML or INI?

    I'm wondering if the XML is faster that INI or vise versa. I'm developing a site that includes many files this question is connected to my problem about including many files and I decided to take another step...Learn More
    PHPXMLParsingincluderequireProgramming Languages
  12. Require a ruby gem (eventmachine) in a shared server environment

    I installed the eventmachine rubygem with 'gem install eventmachine' and confirmed its installed by running gem list --local and it shows up. I ran setup.rb in the eventmachine directory as well. The following...Learn More