I have a line of PHP source code I would like to keep in a PHP file as a comment, so it can be used when necessary. This is only a debugging script, so keeping the file clean is not an issue.
Nevertheless, I am trying to comment these lines using /* and */:
/*
$path = FOLDER . "*/*/*/*/*.gif";
$files = glob($path);
*/
But this result in a parse error, because the path */*/*/ closes the comment block. An opening /* won’t be treated as an opening comment inside a string, but since the commented code is not parsed, the */ is treated as a closing comment.
Can anyone can think of a workaround without using //?
use
"*/*/*/*/*.gif"slashes asDIRECTORY_SEPARATORconstant?You can make a shortcut like
define('DS', DIRECTORY_SEPARATOR);