I'm working on a wordpress theme locally using MAMP on Mac. It seems to be giving me a 500 error no matter what line I try. I'm trying to require the /inc/customizer.php in the functions.php file. This is a wordpress theme I'm building from scratch.
<?php require('../includes/config.inc.php'); include ('../includes/header.html'); $page_name = NAME; $page_title = 'Home'; ?> <div style="background-color:green;" class="container"> <div class="section"> <
From a performance perspective, is there any difference between invoking code by wrapping it in a function and then exporting it: function doSomething () { // doing something here } module.exports = doSomething(); And just requiring it without any ex
I am seasoned in JavaScript, but very new to node and to Electron. I am trying to piece the technique together from code samples and what documentation I can find. I would like to include my menu code in a separate file. The main code is in a file ca
Is it possible to list all methods, constants, classes, etc that I can use because of executing require 'set'?You can, but it is hackish, and there is probably no efficient way. One way is to record the inventory of modules and their constants and me
What is difference between var XYZ = require('./../xyz'); and var XYZ = require('../xyz'); Which one is prefered?If we narrate it: ../ means to say look one directory back while ./../ means to say look one directory back from current directory. Summr
I want to pass a string in javascript module module1.js var currency = 'dollar' module = require('./module2')(currency) How can I do that because right now I have this error TypeError: string is not a function e=[TypeError:string is not a function] T
I have followed the steps from here http://expressjs.com/en/starter/installing.html to install express NodeJS application. After installing we moved to "myapp" directory and then we have installed "aws-iot-device-sdk" from https://gith
Coming to Ruby from a PHP background, I'm used to being able to use require, require_once, include, or include_once which all have a similar effect, but the key being they continue to process code in the same scope where the include / require command
In the past, based on a stylistic decision, I've created gems that use use names containing dashes: foo-bar However, the folder structure under lib looks more like this: lib foo_bar.rb If I use one of my own gems in the Gemfile of another project, Bu
I am having trouble in defining paths in nodejs. I need to define path with some ../../ But really I don't understand how to Use this .. notations. Example: var core=require('../../app/server/controllers'); in Meanjs 0.3 which worked good. Now I chan
I have very freak problem :-) Please, see this simple website: http://tests.vipserv.org/ There is... "1" number. But in code there is no any "1"... I converted eol to Unix. No results. Also changed coding to UTF with/without boom. &quo
Good night. Please excuse me for my english, I'm from Costa Rica... I am working with PHP POO and I have a problem. The error is the next: Fatal error: Class 'mysql' not found in /home/casa/public_html/guaria/clases/verificaSesion.php on line 15 All
Is it possible to get the location of the file which requires another file in Ruby? I have a project where I spawn some processes and I would love to be able, in the code, to determine which file is the parent of the required file. This is nice when
Just wondering is this could be a potential security problem with MySQL and PHP: I have a connect.php file on a server, if someone used require(http://myurl.com/connect.php/);, would this allow them access to my database? Thanks in advanceNo, but for
First of all, I'm using a custom build of dojo framework (v1.9.0) done with build.dojotoolkit.org/, with my required modules, included the loader module. I have a question related to the dojo.require loader and the jQuery framework. The main question
I am in the process of converting a massive .js file into AMD modules using requirejs I realise the concept about returning function and such which are much link classes, however, how do I handle events such as: $('blah blah').onClick( ... $('blah bl
I have code in a database that has different node modules in it. Like this: exports.hello = hello Normally, I would just use hello = require './hello.js'. However, becuase the code is stored in the db, I can't include a path to the file. When I try a
I got a Problem with the Require src="menu" with Alloy. I get an compile error when I want to import my Menu via the Require XML-Tag. my Menu.xml: <Alloy> <Menu id="menu"> <MenuItem onClick="doSomething" title=
I am struggling with the requirejs optimizer. This code will work if I just load it in the browser without optimization. If I run the optimizer I get : ENOENT, no such file or directory 'C:\Users\dev\checkout\src\main\webapp\resources\scripts\ json2.
how can i get the root to the main folder? for example i run file in this location : public_html/admin/user/etc/index.php and i want to include file from public_html/includes/user/etc/function.php so i want to do something like this: include(get_firs
I wanted to know the command which is exactly equal to php require in my GSP (Grails server pages) or in Groovy. I know I can use <g:include/> but wanted to know is there any command which will fulfill php require in groovy/grails?An exact equivalen
I have RubyGems version 1.8.5 and Ruby version 1.8.7. My problem is that even after installing gems I am not able to require it. On the command line typing gem list --local gives: bundler (1.0.15) hpricot (0.8.4) json (1.5.1) redcarpet (1.17.1) But t
I am currently reading through this guide: http://guides.rubygems.org/what-is-a-gem/ Under the third section ("Requiring code"), it says that if I run require 'rake', it should fail, because "because RubyGems isn't loaded yet.". Howeve
I have the following saved in test.js. It successfully extends Array in the browser, but it doesn't seem to work with node and require. Can someone explain what's wrong here? (function() { Array.prototype.max = function() { return console.log("Array.
what might be the possible reason? #wordlist.rb code_words = { 'starmonkeys' => 'Phil and Pete, those prickly chancellors of the New Reich', 'catapult' => 'chucky go-go', 'firebomb' => 'Heat-Assisted Living', 'Nigeria' => "Ny and Jerry's
I have a Ruby code with different classes in a few files. In one file, I start the execution. This file requires my other files. Is this a good way to start a ruby code? When I run the code from a symbolic link, for example DIR2/MyRubyCode is a link
In my script, I set the include path (so another part of the application can include files too), check that a file exists, and include it. However, after I set the include path, file_exists() reports that the file does not exist, yet I can still incl
This is a newbie question as I am attempting to learn Ruby by myself, so apologies if it sounds like a silly question! I am reading through the examples of why's (poignant) guide to ruby and am in chapter 4. I typed the code_words Hash into a file ca
So I am toying with some black magic in Perl (eventually we all do :-) and I am a little confused as to exactly how I am supposed to be doing all of this. Here is what I'm starting with: use strict; use warnings; use feature ':5.10'; my $classname =