php 代替 echo 方法, 或者php的 替换语法使用方法.
修改php.ini文件.
如下.
1. short_open_tag = Off
如果改成On
我们可以在php中
<?= $variable?>来代替 <?php echo $variable ?>
2. asp_tags = Off
如果改成On
同样可以在php中
<%= $variable %> 来替代<?php echo $variable ?>
怎么样. 方便吧????
继续研究~~~~~~!!!!~~!~!~!~!~!~!~!
相关文档:
我们知道用powerdesigner导出的sql文件后缀为'.sql';用phpmyadmin很容易导入MysQL数据库,但是用PHP怎么导入数据库呢?
我用powerdesigner设计一个数据库后导出sql文件(一个投票系统)为'vote.sql';
文件内容为(一些sql语句和注释):
/*======================= ......
<p>04级新生名单</p>
<table border="1" width="80%" cellpadding="0">
<tr>
<td width="10%" align="center">Id</td>
<td width="20%" align="center">Name</td>
<td width="10%" align="center">Age</td>
<td width="10%" align="cent ......
<?
error_reporting(2047);#报告所有非法的错误
ob_start();
function RMB ($RMB=0,$Format='') {
/*
*/
$RMB=@preg_Replace(
array('/([, ]|¥|0$|)/','/(.){2,}/'),
array('','.'),
$RMB);
if(eregi("[^0-9.]",$RMB))return "非法金额";
if($RMB==0)retur ......
<?php
$zip_filename = "testpm.zip";
$zip_filename = key_exists('zip', $_GET) && $_GET['zip']?$_GET['zip']:$zip_filename;
$zip_filepath = str_replace('\\', '/', dirname(__FILE__)) . '/' . $zip_filename;
if(!is_file($zip_filepath))
{
die('文件"'.$zip_ ......
1.确认系统中安装了php-cli
安装命令:
apt-get install php5-cli
2.新建用户crontab
命令:
crontab -e
我的crontab内容文件如下:
# m h dom mon dow command
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
* */1 * * * /root/myshell/proj1.sh
*/1 * ......