对于学校项目,我不允许使用存储过程来存储我的SQL脚本.为了解决这个问题,我试图在我的类程序集中创建一个SQL_scripts文件夹.
现在我被困在如何从相对路径读取我的脚本?
在这里我尝试没有成功:
var appDomain = System.AppDomain.CurrentDomain;
var basePath = appDomain.RelativeSearchPath ?? appDomain.BaseDirectory;
string path = Path.Combine(basePath, "SQL_scriptes", "GetAllEmptyRoomsAtDateRange.sql");
string query = File.ReadAllText(path);
Run Code Online (Sandbox Code Playgroud)
但我总是在以下文件夹中:
任何的想法?
我正在尝试使用PHP的Sessions,我session_start();在我的开头使用它,index.php但得到以下错误消息:
警告:session_start()[function.session-start]:无法发送会话cookie - 已经在/home/ideal906/public_html/index.php中发送的输出(输出从/home/ideal906/public_html/index.php:1开始)在第2行
警告:session_start()[function.session-start]:无法发送会话缓存限制器 - 已在/home/ideal906/public_html/index.php中发送的标头(输出从/home/ideal906/public_html/index.php:1开始)在第2行
这很奇怪,这是我网站的第一行:
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Pierre Anken">
<meta name="description" content="Outil de création de menus équlibrés selon vos besoins">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="jquery.js"></script>
<script src="scripts.js"></script>
<link rel="stylesheet" href="style.css" />
<title>Composez vos menus</title>
</head>
<body>
<section id='sectionCentre'>
<div id='presentation'>
<h2>Ideal Menu</h2>
</div>
</section>
<section id='bandeauHautDoite'>
<nav>
<ul>
<a href='#' elementMenu='monCompte' id='monCompte'>Mon compte</a><br/>
<a href='#' elementMenu='mesMenus' id='mesMenus'>Mes menus</a><br/>
<a …Run Code Online (Sandbox Code Playgroud)